Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Problem parsing a RSS file with XML parser

From: Pelle Nilsson <pellenilsson@--------.-->
To: xml-dev@-----.---.---
Date: 9/8/2004 10:22:00 PM
Hi!

I am trying to validate a RSS 0.9 document (not created by myself)
with PHP's DOM parser. The parser can't parse the file,
because it mistakes the doctype-tag for the root tag. Thus it gives a
warning about junk after the root tag, and the DOM only contains a
doctype node.

The validator at http://www.stg.brown.edu/service/xmlvalid/ says that
it "can't resolve Public ID", so it seems the problem lies in the
doctype-tag. The strange thing is that the doctype-tag i totally
identical to what is stated in the RSS 0.91 spec at
http://my.netscape.com/publish/formats/rss-spec-0.91.html

The relevant part of the RSS file looks like this:



<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
           "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

(contents of root tag left out)

</rss>



The full file resides at http://www.yelah.net/backend.php

Can anyone figure out what's wrong?

/Pelle


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent