WriteXML encoding strings ! Please help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: sorCrer (junk_at_spirit.co.za)
Date: 11/20/04


Date: 20 Nov 2004 00:32:05 -0800

Hi Guru's,

Going crazy with this problem!

I fill a dataset in asp.net with a 'FOR XML AUTO' query and Output it
back to the browser.

> DS.WriteXml(Response.OutputStream, XmlWriteMode.IgnoreSchema)

No matter what I do I get the first nodes "<" encoded as "&lt;" This
means that the script that I am using can't recognise the first node.
I would replace the characters but then the output is no longer
recognised as XML.

Why is this behaviour implemented? I basically end with this

<Tables>
    <XML_F52E2B61-18A1-11d1-B105-00805F49916B>&lt;row tID="1" tNo="11"
tLeft="123" tTop="432"/&gt;</XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</Tables>

Please assist urgent!

Thanks
sorCrer



Relevant Pages

  • Creating correct XML output?
    ... I'm running a SELECT query (consisting of UNIONS) with FOR XML AUTO ... I cannot get away from running the query as a string since it is built ...
    (microsoft.public.sqlserver.xml)
  • How to get XML from SQL Server
    ... SELECT field0, ..., fieldN FROM mytable where FOR XML AUTO ... I use a TAdoQuery to get back result, and I get only a field with a blob ... Now I want to read the contents of the blob field, ... This is how appears in the Microsoft Query Analyzer ...
    (borland.public.delphi.database.ado)
  • Another problem w/ NULL values in XML
    ... We want to convert NULL columns returned in a query to value of 0 when using ... it w/ FOR XML AUTO. ... XML document. ... WTF?? ...
    (microsoft.public.sqlserver.programming)
  • Re: Query problem ...
    ... The problem is that i have many joins on this query, ... It's a mess because I cannot figure out how to predict how the XML AUTO will ... because I'm using BizTalk 2004 I cannot ... Or would that remove duplicates that you want to have ...
    (microsoft.public.sqlserver.xml)