[jdom-interest] Parsing an XML Schema

Kevin POCHAT kpochat at gmail.com
Mon Jul 31 01:02:06 PDT 2006


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.

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.
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.

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.

Regards,

Kevin POCHAT

2006/7/30, Paul Libbrecht <paul at activemath.org>:
>
> ?? 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
>
>
>
> _______________________________________________
> 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/02129a38/attachment.htm


More information about the jdom-interest mailing list