• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How do i build up a dtd file using xerces-1_2_2 api

 
l p
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As xerces-1_2_2 api provides methods to build up an xml document, are there classes and methods in xerces-1_2_2 to build a dtd file.If someone has worked on this, please help out..Its urgent!!
Thanks in advance
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Xerces is an XML parser. It can only parse/validate an XML document. The "building" thing you're talking about is the DOM implementation that allows nodes, elements and documents to be created on the fly.
AFAIK, I don't know any feature in Xerces that allows you to create DTDs from XML documents. However, there are some tools and freewares( checkout www.xmlsoftware.com ) that might have this reverse engineering feature ie., given an XML document, generate the DTD.


------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Your name does not comply with the JavaRanch naming policy. We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please spare a moment and re-register with a name that meets the requirements.
Thanks!
 
l p
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ajith Kallambella,
Thank you for the help..
But then, in the Xerces Api's there are certain classes like DTDHandler, DTDGrammer. What are these used for??
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These are the call-back implementations that you can register with the parser if your application wants to be notified while the parser steps through the DTD. Since parsing the XML includes parsing the DTD, events are generated during the DTD traversal( I am hesitant to use the word parsing here ). By registering these implementations with the parser, your application can listen to these events and take additional actions if necessary.
I suggest you read the Xerces documentation and also checkout the examples that come with the Xerces download. In addition to these resources, any good book on Java and XML will teach you about DTD handlers.
Hope that helps!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ajith Kallambella,
Thank you once again.

--liinaa
 
reply
    Bookmark Topic Watch Topic
  • New Topic