This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Assuming my xml is as :
<body>Don't forget me this weekend!</body>
<body>I will not</body>
I would like to create dtd/schema for that. Also would like to validate that xml using DOM. Please suggest
Validation implies the presence of some form of schema (DTD, XSD, Relax-NG). But it sounds as if you want to check whether an XML document is wellformed instead. Simply parse the XML and see if an exception happens.