> I have a CXML doc that gets passed to me through a form field. If I
> remove the line "<!DOCTYPE cXML SYSTEM
> "http://xml.cxml.org/schemas/cXML/1.1.009/cXML.dtd">" I can parse it
> perfectly with CF. What can I do to be able to parse this correctly?

First of all, even if CF MX doesn't validate XML documents (not out of the
box at least), the XML parser still load and parse DTDs whenever they are
available, since it may be required in order to expand entities.

In your case, the url above points to a DTD with a few issues:

- The server send it out using "application/xml" as mime-type... Not a great
choice, they should serve it as plain text instead

- The DTD contains an XML declaration!

As a result, the parser refuse to load the DTD...
If you try to open the url above with a browser (both IE or Mozilla) you get
a syntax error as well

Hope it will help

----------------------------
Massimo Foti
http://www.massimocorner.com

Co-Author of Dreamweaver MX 2004 Magic:
http://www.dwmagic.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to