to paul : As he converted it to an XML Schema (hope the converter does a good job, or maybe did he converted it manually), he can parse it with JDOM.<br><br>to enis : As for getting only elements and attributes, I suggest you read any JDOM examples you can find as parsing a schema is exactly the same job as parsing "normal" XML. Just filter the elements you need.
<br>If you're aiming for good performance, you can check the XML Schema specification, or the W3Schools reference in order not to dig schema elements that cannot contain anything interesting.<br><br>I don't have time right now to write you an XML Schema parsing example, but it would be similar to any other JDOM example.
<br><br>Regards,<br><br>Kevin POCHAT<br><br><div><span class="gmail_quote">2006/7/30, Paul Libbrecht <<a href="mailto:paul@activemath.org">paul@activemath.org</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
?? A DTD, although it is part of an XML file, is not, in itself, an XML<br>file, i.e. it's information-set, according to XML, is empty... or do I<br>mistake ??<br>Normal SAX parsers (Xerces, AElfred, Crimson...) parse the DTD when
<br>parsing the xml file that references it but do not deliver any<br> info from it. Xerces has some interfaces within XNI (but this is mostly<br>xml-schema oriented).<br><br>I think what you need is DTDparser... does a good job!
<br><br>paul<br><br>enis enis wrote:<br>> Hi everyone,<br>><br>> I have a DTD to parse as an XML file (tree structure), so I converted<br>> it to xml schema to parse it : I need to get the elements (and the<br>
> attributes) starting by the root and then the children (from left to<br>> right)... So I need an example of a java class that does that with JDOM.<br>><br>> thanks.<br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> To control your jdom-interest membership:<br>> <a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
</a><br><br><br><br>_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
</a><br><br><br></blockquote></div><br>