Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: simple xml output [Thread Next] Re: simple xml outputTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
