Hi,
there is no way how to detect if a tag was self-closed in source form.
There is no difference between <tag></tag> and <tag/> in XML. You
probably need this for XHTML which (for compatibility with HTML)
distinguish between these two forms. If it is this case you can use
org.dom4j.io.HTMLWriter class, which knows which tags should be
written in short form and which in long form.
Sincerely,

Filip Jirsák

2008/8/23 Dhanji R. Prasanna <[EMAIL PROTECTED]>:
> Hi
> I'm using dom4j to parse an XML template and then render it back out as XML
> after some transformation work. It is important that I be able to preserve
> tags that are *not* self-closed even if they have no nested content. For
> example:
> <script src=".."></script>
> Is there any way to detect if a tag is self-closed from the dom4j Element
> interface?
> Thanks,
> Dhanji.
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> dom4j-user mailing list
> dom4j-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
>



-- 
Filip Jirsák
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to