Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: simple xml output

From: "Anthony Jones" <Ant@------------.--->
To: NULL
Date: 2/7/2008 4:55:00 PM

"Tom" <buckit@n...> wrote in message
news:OxOotAZaIHA.1204@T......
> Anthony, Yes we're using ServerXMLHTTP.  What I want to do though is to
take
> the contents of what I've already opened from a file using...
> set xml = Server.CreateObject("Microsoft.xmlDOM")

Use MSXML2.DOMDocument.3.0 its better to be explicit about what you want.

>
> xml.async = false
>
> xml.load(Server.MapPath("Hit-Response.xml"))
>
> ...and write the entire document to a database table. The field in the
> database should then contain <?xml version="1.0" encoding="utf-8"
> ?><Response Version="1.1" ReportDate="2007-07-31"
> TransactionID="fitu0goACqQAACLtbbsAAAAC" StatusCode="1"
> ClientReferenceNumber="987654321" StatusDescription="Success">...all other
> child nodes...</Response>
>

You can retrieve the document XML as a string using its xml property.

rs("myXML").Value = xml.xml

You haven't stated what DB you are using but you are going to need a unicode
capable character type such as SQL Servers NVARCHAR or NTEXT.  The xml
property will be unicode so the encoding will always be UTF-16 despite what
the file currently says it is.

You did mention you retrieve this data from a remote server using
responseText, how do you save that to disk.  If not done correctly you could
suffer character encoding problems.



-- 
Anthony Jones - MVP ASP/ASP.NET




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