|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Parser for DTDs
Hi.
I am looking for a java parser that when fed a DTD returns a model
representing all the valid documents that can be expressed using that
DTD, i.e. for any given element type I need to be able to determine what
are valid sub-elements/attributes/content. One additional constraint is
that I need to parse the DTD outside of the context of an XML document.
I would ideally like to be able to write code something like :-
>DTDParser dp = new DTDParser( dtdInputStream );
>if( dp.isValid() == true ) {
> Element[] childElems = dp.getRoot().getChildElements();
> Attribute[] attrs = childElems[0].getAttributes();
>
> if( childElems[0].isChildElement( "someelement" ) == true ) {
> ...
> }
>}
I believe Larval may have this kind of capability (i'm not sure yet),
are there others?
Best regards.
Matt/
--
Matt Mower, Information Systems Team, University of North London
T: +44-(0)171-753-3288 F: +44-(0)171-753-5120 E: m.mower@u...
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








