[jdom-interest] Parsing an XML Schema

enis enis enis_ch2001 at yahoo.fr
Mon Jul 31 12:57:33 PDT 2006


The problem is that a schema does not define a "root" element , and that's the main point for me, because I need to work on the file (xml schema or dtd) as a tree structure, it means the parsing must start by the root element and then the chidren of the current element (from left to right -> prefix). So how can I do that ?


>>>>>>>>

?? A DTD, although it is part of an XML file, is not, in itself, an XML 
file, i.e. it's information-set, according to XML, is empty... or do I 
mistake ??
Normal SAX parsers (Xerces, AElfred, Crimson...) parse the DTD when 
parsing the xml file that references it but do not deliver any
 info from it. Xerces has some interfaces within XNI (but this is mostly 
xml-schema oriented).

I think what you need is DTDparser... does a good job!

paul

enis enis wrote:
> Hi everyone,
>
> I have a DTD to parse as an XML file (tree structure), so I converted 
> it to xml schema to parse it : I need to get the elements (and the 
> attributes) starting by the root and then the children (from left to 
> right)... So  I need an example of a java class that does that with JDOM.
>
> thanks.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20060731/36640455/attachment.htm


More information about the jdom-interest mailing list