[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Parser for DTDs

  • From: francis <francis@r...>
  • To: Matt Mower <m.mower@u...>
  • Date: Tue, 21 Apr 1998 17:00:04 +0100

dtd jtree
Hi,


Matt Mower wrote:
> 
> 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 can recommend Aelfred from microstar.com - it gives your program
callbacks which get called for DTD events like new element and tag
definitions as well as the expected XML events. There is a nice simple
DtdDemo.java program which you can hack to slap things into a Swing
JTree. 

Aelfred parses the DTD from the XML document however - if you need to
parse the DTD directly then the IBM parser certainly mentions this
feature in its documentation, the Microsoft one also mentions it as
available via a slightly non-recommended direct access to the the parser
object. I haven't used either yet...

http://www.alphaWorks.ibm.com/formula/
http://www.microsoft.com/workshop/author/xml/parser/
http://www.microstar.com/xml/

Hmmm - just cut and pasted IBM's command line DTD demo from the
codumentation into a DOS box

	jre -cp "xml4j.jar" GeneratingSample personal.dtd

and it worked straight off - nice...


Francis.

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.