[xml] Validation during XML doc parse.

Title: Validation during XML doc parse.

My goal is simple, to parse an XML doc USING the dtd to validate the doc. Not parse the doc, then validate.

* I found on the topic at http://mail.gnome.org/archives/xml/2001-September/msg00107.html , though the topic is not the same the solution could be used. Though he uses "doc" but never creates one. So you validate an empty doc?

An example of my problem is that xmlParseFile returns a NULL doc because it uses its own validation to check the format of the file, but If xmlParseFile used the corisponding dtd then it would know that it was following the rules.

<Title title="Long days & and short nights."><!CDATA[Long days & and short nights.]]></Title>

In the dtd the title attribute would need to be defined CDATA to allow the ampersand here. xmlParseFile would return this doc NULL because the ampersand is not allowed in the attribute field. So you see my problem.

I don't plan on slowing down, but any help would be great.

Charles Floyd

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]