Click to See Complete Forum and Search --> : Problem in XML Parsing


chadalawada
06-14-2007, 01:31 AM
i'm doing my first project in XML.
i have an XML document and i have written DTD for that when i have to parse the XML document i don't understand how to do it i don't actually understand if there is any predefined code for that or i'll have to write code for that or should i use any tool for parsing my XML document.
i was stuck up at this point and couldn't move further can anyone plz help me out?

Stephen Philbin
06-19-2007, 12:15 PM
What you'll need is what's referred to as a "validating XML processor". In most cases related to web development, this will be either a user's web browser, or a server's XML library. For information on writing XML DTDs, I strongly recommend reading the XML 1.0 Recommendation (http://www.w3.org/TR/xml/). For working examples of XML DTDs in action (or in some cases pretending to be in action) then I suggest the XHTML 1.0 and 1.1 DTDs.

It is worth mentioning, though, that it's not always necessary for an XML document to be valid. It is only required that an XML document be "well-formed (http://www.w3.org/TR/xml/#sec-well-formed)".