Alan McGuinness wrote: > I'm new to this XML thing, so I'm playing with Xerces. I'm just wondering > how do I specify what DTD file that I want to use to validate my XML string > when using a DOM parser?
Your document must have a DOCTYPE line. For example: <!DOCTYPE root SYSTEM 'grammar.dtd'> <root/> Check the XML 1.0 (second edition) spec located at w3.org for exact details. Later, when Xerces2 has a proper grammar caching mechanism, it should be possible to validate a document using a pre-loaded DTD grammar regardless of whether the document contained an explicit DOCTYPE line. > I realise this is a newbie question, but humour me! :) A couple of cannibals are eating a clown. One cannibal turns to the other and asks, "Does this taste funny to you?" -- Andy Clark * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
