Altova Mailing List Archives


Re: multiple root elements

From: "Chris Lovett" <clovett@---------.---.--_---->
To: NULL
Date: 7/12/2004 12:54:00 PM
Sometimes an HTTP server will return different things depending on the
client "USER_AGENT" string in the http header.  Perhaps it is returning an
HTML page in one case which is resulting in this error.

"Duncan Welch" <dunc@n...> wrote in message
news:Oe5e3ozZEHA.1508@T......
> Hi,
>
> Firstly, thanks to everyone who answered my last post re: changing the
> encoding type.  It's all looking much better now; the xml that's being
> parsed is a mess - but at least I can read it now!
>
> I've signed up for adata feed through Affiliate Window, but when I try to
> read the XML feed using either an XMLTextReader or a [DataSet].XMLRead, I
> get a "multiple root elements" error - even though there aren't.  Does
> anyone know why this error is coming up, or - better still - have an
example
> of reading these XML feeds?
>
> I've copied the first two records of the XML below.
>
> Thanks in advance,
>
> Duncan
>
> ---/ snip /---
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <products>
>  <product>
>   <Advertiser><![CDATA[12345]]></Advertiser>
>   <language><![CDATA[]]></language>
>   <masterCategoryID><![CDATA[281300]]></masterCategoryID>
>   <masterCategory><![CDATA[Sparkling Wines]]></masterCategory>
>   <offerID><![CDATA[87183]]></offerID>
>   <productID><![CDATA[]]></productID>
>   <productname><![CDATA[Cuvée Napa by Mumm Rosé NV, 75cl]]></productname>
>   <brand><![CDATA[USA]]></brand>
>   <promotionText><![CDATA[]]></promotionText>
>   <description><![CDATA[Fruity fizz that has good complexity and great
> balance that sets it above other roses.]]></description>
>   <deepLink><![CDATA[http://www.awin1.com/awclick.php]]></deepLink>
>
>
<imageURL><![CDATA[http://www.12345.com/photos/thumbnails/87183_thumbnail.gi
> f]]></imageURL>
>   <delivery><![CDATA[]]></delivery>
>   <validFrom><![CDATA[0000-00-00]]></validFrom>
>   <validUntil><![CDATA[0000-00-00]]></validUntil>
>   <Price><![CDATA[GBP11.99]]></Price>
>  </product>
>  <product>
>   <Advertiser><![CDATA[12345]]></Advertiser>
>   <language><![CDATA[]]></language>
>   <masterCategoryID><![CDATA[282300]]></masterCategoryID>
>   <masterCategory><![CDATA[Gin]]></masterCategory>
>   <offerID><![CDATA[54784]]></offerID>
>   <productID><![CDATA[]]></productID>
>   <productname><![CDATA[Tanqueray Gin, 70cl]]></productname>
>   <brand><![CDATA[UK]]></brand>
>   <promotionText><![CDATA[]]></promotionText>
>   <description><![CDATA["The world has tired of mediocre gin" said Rev.
> Charles Tanqueray.]]></description>
>   <deepLink><![CDATA[http://www.awin1.com/awclick.php]]></deepLink>
>
>
<imageURL><![CDATA[http://www.12345.com/photos/thumbnails/54784_thumbnail.gi
> f]]></imageURL>
>   <delivery><![CDATA[]]></delivery>
>   <validFrom><![CDATA[0000-00-00]]></validFrom>
>   <validUntil><![CDATA[0000-00-00]]></validUntil>
>   <Price><![CDATA[GBP14.99]]></Price>
>  </product>
> <!-- more here -->
> </products>
>
>


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.