|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML - load contents onto page.We have a web site using CLASSIC ASP, and a client with what would appear to be a non conforming XML document. Their remote XML document in its entirety looks like so: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://clients.domainname.net">qwerty500</string> I do not have experience in XML retrieval, but I have been tasked with taking the "qwerty500" value and displaying it on an ASP page on our clients site. Getting the XML host to change their file is a no go. The little I do know about XML suggests to me, the XML document has various requirements missing such as a document element and a parent / child structure? I have worked with other XML documents and managed to get them to display,. nut they all had child nodes etc. This one has me stumped. Any help or ideas greatly appreciated. Regards, Mark. SuperMario wrote:
Show quoteHide quote > Hello, Seems pretty straightforward to me:> > We have a web site using CLASSIC ASP, and a client with what would > appear to be a non conforming XML document. > > Their remote XML document in its entirety looks like so: > > <?xml version="1.0" encoding="utf-8"?> > <string xmlns="http://clients.domainname.net">qwerty500</string> > > > I do not have experience in XML retrieval, but I have been tasked with > taking the "qwerty500" value and displaying it on an ASP page on our > clients site. Getting the XML host to change their file is a no go. The > little I do know about XML suggests to me, the XML document has > various requirements missing such as a document element and a parent > / child structure? I have worked with other XML documents and > managed to get them to display,. nut they all had child nodes etc. This > one has me stumped. <% dim xml, xmldoc,node xml="<?xml version=""1.0"" encoding=""utf-8""?>" & _ "<string xmlns=""http://clients.domainname.net"">qwerty500</string>" set xmldoc=createobject("msxml2.domdocument") xmldoc.loadXML xml set node=xmldoc.selectSingleNode("//string") Response.Write node.text %> -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" SuperMario wrote:
Show quoteHide quote > We have a web site using CLASSIC ASP, and a client with what would appear to There is nothing wrong with that XML sample, it has a single element > be a non conforming XML document. > > Their remote XML document in its entirety looks like so: > > <?xml version="1.0" encoding="utf-8"?> > <string xmlns="http://clients.domainname.net">qwerty500</string> > > > I do not have experience in XML retrieval, but I have been tasked with > taking the "qwerty500" value and displaying it on an ASP page on our clients > site. Getting the XML host to change their file is a no go. The little I > do know about XML suggests to me, the XML document has various requirements > missing such as a document element and a parent / child structure? (document element or root element) with local name |string| in the namespace with URI http://clients.domainname.net and that element has a single text node as its only child node. So use any MSXML version you have on your server and load the XML and access the text property of the root element e.g. Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0"); If xmlDoc.load("http://example.com/file.xml") Then Response.Write xmlDoc.documentElement.text Else ' handle parse error here End If
retreiving data from html page
Quizz script performance bug -- too many questions? interesting problem... call store procedure for inserting data in asp SMTP how can i detect multiplt VBNewLine's in a row Assign Javascript value to asp session variable how to run a bat file in remote PC through ASP Running Bat file from ASP on Windows Server x64 problem. Richard Mueller... you out there? |
|||||||||||||||||||||||