473,385 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML/ASP Help Needed

I am new to XML, but not ASP.
I have the following XML that I load via
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.loadXML xmldom.xml
<deals><escanoffers><escanoffer offerid="3743" itemnumber="502022"
upc="4300094509" dealamt="0.20" begindate="03/01/2006"
enddate="03/30/2006" returnby="02/28/2006" selectionlength="14"
maxretail="0.00" /></escanoffers></deals>
I need to parse it, getting all the attributes out, using ASP.
AHIA
Larry...

Feb 1 '06 #1
16 2338
lr*****@gmail.com wrote:
I am new to XML, but not ASP.
I have the following XML that I load via
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.loadXML xmldom.xml
<deals><escanoffers><escanoffer offerid="3743" itemnumber="502022"
upc="4300094509" dealamt="0.20" begindate="03/01/2006"
enddate="03/30/2006" returnby="02/28/2006" selectionlength="14"
maxretail="0.00" /></escanoffers></deals>
I need to parse it, getting all the attributes out, using ASP.


You mean "using vbscript" don't you? or are you using jscript in your asp
page?

Let's assume you want to put the attribute values into a Dictionary object:

dim d, node, attrs, attr, i
set d = createobject("scripting.dictionary")
set node = nothing
set node = xml.selectsinglenode("/deals/escanoffers/escanoffer")
if not node is nothing then
set attrs = node.attributes
for i = attrs.length-1
set attr=attrs.item(i)
d.add attr.nodename, attr.nodevalue
next
end if

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 1 '06 #2
Bob,

Thanks for the response.

Should the FOR line read....
for i = 0 to attrs.length-1

The script is not making it past
if not node is nothing then

I added the last two lines
set attr=attrs.item(i)
response.write "nodename:" & attr.nodename
response.write "nodevalue:" & attr.nodevalue

I need to display the data in the XML doc, is this syntax correct?

Also, there are several escanoffer within escanoffers.

TIA,
Larry...

Feb 1 '06 #3
lr*****@gmail.com wrote:
Bob,

Thanks for the response.

Should the FOR line read....
for i = 0 to attrs.length-1
Yes
The script is not making it past
if not node is nothing then
That means your actual xml is different from the example xml you showed me.
The selectsinglenode method is not finding that node.
I added the last two lines
set attr=attrs.item(i)
response.write "nodename:" & attr.nodename
response.write "nodevalue:" & attr.nodevalue

I need to display the data in the XML doc, is this syntax correct?
Seems to be. You probably want to add some <BR>s
Also, there are several escanoffer within escanoffers.

Then you need to modify the example to:
dim nodes, node, attrs, attr, i
set nodes = nothing
set node = xml.selectnodes("/deals/escanoffers")
if not nodes is nothing then
for i = 0 to nodes.length - 1
set node = nodes.nextnode
set attrs = node.attributes
for i = attrs.length-1
set attr=attrs.item(i)
response.write "nodename:" & attr.nodename
response.write "nodevalue:" & attr.nodevalue
next
next
end if
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 1 '06 #4
Below is the entire XML doc from IE that is displayed when
Set xml = Server.CreateObject("Msxml2.DOMDocument.3.0")
xml.setProperty "SelectionLanguage", "XPath"
xml.async = False
xml.loadXML xmldom.xml
Response.write(xml.xml)
is executed.

I am still not getting past
if not nodes is nothing then

AHIA,
Larry....

PS - thanks for your patients. I am new to XML & very very confused at
this point. Can you recommend any books that will point me in the
right direction??

~_~_~_~Start XML~_~_~_~
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><F
xmlns="http://tempuri.org/AGLinkiDataHoster/AGLinkiDataHost"><RetrievePromotionalOpportunities ListResult>&lt;deals&gt;&lt;escanoffers&gt;&lt;esc anoffer
offerid="3743" itemnumber="502022" upc="4300094509" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3747" itemnumber="502030" upc="4300094502" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3989" itemnumber="553824" upc="1600069320" dealamt="0.77"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3994" itemnumber="556823" upc="1600066510" dealamt="0.60"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="4000" itemnumber="557617" upc="1600068870" dealamt="0.82"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="4004" itemnumber="558060" upc="1600067440" dealamt="0.58"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="4010" itemnumber="558249" upc="1600064670" dealamt="0.82"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3787" itemnumber="502774" upc="4300097199" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3750" itemnumber="502049" upc="4300094511" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3752" itemnumber="502057" upc="4300095019" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3755" itemnumber="502065" upc="4300095022" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3762" itemnumber="502197" upc="4300094520" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3765" itemnumber="502332" upc="4300095077" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3767" itemnumber="502340" upc="4300094963" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3769" itemnumber="502359" upc="4300095085" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3772" itemnumber="502383" upc="4300095016" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3776" itemnumber="502472" upc="4300095009" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3780" itemnumber="502510" upc="4300095025" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3781" itemnumber="502553" upc="4300095023" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /&gt;&lt;escanoffer
offerid="3785" itemnumber="502561" upc="4300094541" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00"
/&gt;&lt;/escanoffers&gt;&lt;/deals&gt;</RetrievePromotionalOpportunitiesListResult></RetrievePromotionalOpportunitiesListResponse></soap:Body></soap:Envelope>
~_~_~_~End XML~_~_~_~

Feb 1 '06 #5
lr*****@gmail.com wrote:
Below is the entire XML doc from IE that is displayed when
Set xml = Server.CreateObject("Msxml2.DOMDocument.3.0")
xml.setProperty "SelectionLanguage", "XPath"
xml.async = False
xml.loadXML xmldom.xml
Response.write(xml.xml)
is executed.

I am still not getting past
if not nodes is nothing then

AHIA,
Larry....

PS - thanks for your patients. I am new to XML & very very confused
at this point. Can you recommend any books that will point me in the
right direction??
No. All I've used is the msdn documentation - msdn.microsoft.com/library
~_~_~_~Start XML~_~_~_~ <RetrievePromotionalOpportunitiesListResult>&lt;de als&gt;&lt;escanoffers&gt;
&lt;escanoffer offerid="3743" itemnumber="502022" upc="4300094509" dealamt="0.20"


Something is strange here. Some htmlencoding is occurring somewhere. Is this
really what it looks like? What about when you View Source? Do the &lt;
become < ?
It looks like the xml is really:
<RetrievePromotionalOpportunitiesListResponse><Ret rievePromotionalOpportunit
iesListResult><deals><escanoffers>
etc.

So that means the xpath used in the selectnodes statement should be

dim path
path="/RetrievePromotionalOpportunitiesListResponse" & _
"/RetrievePromotionalOpportunitiesListResult/deals" & _
"/escanoffers/escanoffer"
set node = xml.selectnodes(path)

Less efficient but simpler would be:
set node = xml.selectnodes("//escanoffer")

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 1 '06 #6
Something is strange here. Some htmlencoding is occurring somewhere. Is
this
really what it looks like?
YES

What about when you View Source?
THAT IS WHAT I SENT YOU

Do the &lt; become < ?
NO

Could this be a problem on the host side??

I thought this could be a firewall issue. I ran the script from a box
sitting outside, same result.

My entire script is below. User name & password changed for security.

~_~_~_~Begin Script~_~_~_~
<%@ Language=VBScript %>
<%Response.Buffer=true%>
<%
const SoapServer =
"https://webapps.agbr.com/AGLinkiDataHoster/AGLinkiDataHost.asmx"

set xmldom = server.CreateObject("Microsoft.XMLDOM")
set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", SoapServer, false
xmlhttp.setRequestHeader "Man" , POST & "
/AGLinkiDataHoster/AGLinkiDataHost.asmx HTTP/1.1"
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.setRequestHeader "Content-Length", Len(SoapTest)
xmlhttp.setRequestHeader
"SOAPAction","http://tempuri.org/AGLinkiDataHoster/AGLinkiDataHost/RetrievePromotionalOpportunitiesList"

xmlhttp.send(SoapTest)

if xmlhttp.Status = 200 then '405 means error, 200 means ok. You know
why.

Set xmldom = xmlhttp.responseXML

Dim xml
Set xml = Server.CreateObject("Microsoft.XMLDOM")
'Set xml = Server.CreateObject("Msxml2.DOMDocument.3.0")
xml.setProperty "SelectionLanguage", "XPath"
xml.async = False
xml.loadXML xmldom.xml

dim nodes, node, attrs, attr, i
set nodes = nothing
path="/RetrievePromotionalOpportunitiesListResponse" & _
"/RetrievePromotionalOpportunitiesListResult/deals" & _
"/escanoffers/escanoffer"
'set node = xml.selectnodes(path)
set node = xml.selectnodes("//escanoffer")
'set node =
xmldom.selectnodes("/RetrievePromotionalOpportunitiesListResponse/RetrievePromotionalOpportunitiesListResult/deals/escanoffers")

if not nodes is nothing then
for i = 0 to nodes.length - 1
set attrs = node.attributes
for x = 0 to attrs.length-1
set attr=attrs.item(x)
response.write "nodename:" & attr.nodename & "<br>"
response.write "nodevalue:" & attr.nodevalue & "<br>"
next
set node = nodes.nextnode
next
end if

'Set xml = Nothing
Response.write(xml.xml)
Else
Response.Write("Didn't Work<BR>")
Response.Write("status="&xmlhttp.status)
Response.write("<BR>"&xmlhttp.statusText)
Response.Write("<BR>"&Request.ServerVariables("ALL _HTTP"))
End if
set xmlhttp = nothing
set xmldom = nothing
function SoapTest()
SoapTest = SoapTest & "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
SoapTest = SoapTest & " <soap:Body>"
SoapTest = SoapTest & " <RetrievePromotionalOpportunitiesList
xmlns=""http://tempuri.org/AGLinkiDataHoster/AGLinkiDataHost"">"
SoapTest = SoapTest & " <Username>ROUSECORP</Username>"
SoapTest = SoapTest & " <Password>agR18!</Password>"
SoapTest = SoapTest & " </RetrievePromotionalOpportunitiesList>"
SoapTest = SoapTest & " </soap:Body>"
SoapTest = SoapTest & "</soap:Envelope>"
end function
%>
~_~_~_~End Script~_~_~_~

Feb 1 '06 #7
lr*****@gmail.com wrote:
Something is strange here. Some htmlencoding is occurring somewhere.
Is this
really what it looks like?
YES

What about when you View Source?
THAT IS WHAT I SENT YOU

Do the &lt; become < ?
NO

Could this be a problem on the host side??

I thought this could be a firewall issue. I ran the script from a box
sitting outside, same result.

My entire script is below. User name & password changed for security.
Set xmldom = xmlhttp.responseXML

Why not use xmldom? What is the point in creating another object?
Dim xml <snip> 'set node = xml.selectnodes(path)
set node = xml.selectnodes("//escanoffer")
'set node =

xmldom.selectnodes("/RetrievePromotionalOpportunitiesListResponse/RetrievePr
omotionalOpportunitiesListResult/deals/escanoffers")

oops - typo on my part here: "node" should be "nodes" in the previous
statement.

Other than that, I really don't know what is going on.

Does the encoding occur if you do this?

response.contenttype="text/xml"
xmldom.save Response
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 1 '06 #8
Now, since I added

response.contenttype="text/xml"
xmldom.save Response

the XML displays correctly in IE, but the view source still returns the
same stuff ...&lt;deals&gt;&lt;escanoffers&gt;&lt;...and the script
does not dispaly any node names or values.

Feb 1 '06 #9
lr*****@gmail.com wrote:
Now, since I added

response.contenttype="text/xml"
xmldom.save Response

the XML displays correctly in IE, but the view source still returns
the same stuff ...&lt;deals&gt;&lt;escanoffers&gt;&lt;...and the
script does not dispaly any node names or values.


Since it displays correctly in the browser window, could you copy it from
there, cut out the majority of the child nodes and post it here?
--
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"
Feb 2 '06 #10
<?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <RetrievePromotionalOpportunitiesListResponse
xmlns="http://tempuri.org/AGLinkiDataHoster/AGLinkiDataHost">

<RetrievePromotionalOpportunitiesListResult><deals ><escanoffers><escanoffer
offerid="3743" itemnumber="502022" upc="4300094509" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3747"
itemnumber="502030" upc="4300094502" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3989"
itemnumber="553824" upc="1600069320" dealamt="0.77"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3994"
itemnumber="556823" upc="1600066510" dealamt="0.60"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="4000"
itemnumber="557617" upc="1600068870" dealamt="0.82"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="4004"
itemnumber="558060" upc="1600067440" dealamt="0.58"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="4010"
itemnumber="558249" upc="1600064670" dealamt="0.82"
begindate="03/01/2006" enddate="04/01/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3787"
itemnumber="502774" upc="4300097199" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3750"
itemnumber="502049" upc="4300094511" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00" /><escanoffer offerid="3752"
itemnumber="502057" upc="4300095019" dealamt="0.20"
begindate="03/01/2006" enddate="03/30/2006" returnby="02/28/2006"
selectionlength="14" maxretail="0.00"
/></escanoffers></deals></RetrievePromotionalOpportunitiesListResult>
</RetrievePromotionalOpportunitiesListResponse>
</soap:Body>
</soap:Envelope>

Feb 2 '06 #11
The problem is not in the line below...
if not nodes is nothing then
it is in the for line
for i = 0 to nodes.length - 1
because nodes.length = 0

Feb 2 '06 #12
lr*****@gmail.com wrote:
The problem is not in the line below...
if not nodes is nothing then
it is in the for line
for i = 0 to nodes.length - 1
because nodes.length = 0


I have tested the following code with the xml you posted (after removing the
space from before the <?xml declaration and the hyphens from the
"expandable" elements.

If this code does not work for you, then you will need to decode the
incoming xml, using the Replace function to replace "&lt;" with "<" and
"&gt;" with ">" and see if that works
<%
dim xmldom, nodes, node, attr, path, xPE, i, strMessage, j
set xmldom=createobject("msxml2.domdocument")
if xmldom.load( server.MapPath("soap.xml")) then
'Response.ContentType="text/xml"
'xmldom.save Response
'path="//deals/escanoffers/escanoffer"
path="/soap:Envelope/soap:Body/" & _
"RetrievePromotionalOpportunitiesListResponse" & _
"/RetrievePromotionalOpportunitiesListResult/deals" & _
"/escanoffers/escanoffer"

set nodes=nothing
set nodes=xmldom.selectNodes(path)
if not nodes is nothing then
if nodes.length>0 then
Response.Write "<table border=""1"" cellspacing=""0"">"
for i = 0 to nodes.length - 1
set node = nodes.nextnode
set attrs = node.attributes
if i = 0 then
Response.Write "<tr>"
for j = 0 to attrs.length-1
set attr=attrs.item(j)
response.write "<th>" & attr.nodename & "</th>"
next
Response.Write "</tr>"
end if
Response.Write "<tr>"
for j = 0 to attrs.length-1
set attr=attrs.item(j)
response.write "<td>" & attr.nodevalue & "</td>"
next
Response.Write "</tr>"
next
Response.Write "</table>"
else
Response.Write path & "did not work"
end if
else
Response.Write path & "did not work"
end if

else
set xPE=xmldom.parseError
strMessage = "errorCode = " & xPE.errorCode & vbCrLf
strMessage = strMessage & "reason = " & xPE.reason & vbCrLf
strMessage = strMessage & "Line = " & xPE.Line & vbCrLf
strMessage = strMessage & "linepos = " & xPE.linepos & vbCrLf
strMessage = strMessage & "filepos = " & xPE.filepos & vbCrLf
strMessage = strMessage & "srcText = " & xPE.srcText & vbCrLf
set xPE = nothing
Response.Write strMessage
end if

%>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 2 '06 #13
Bob,

I have put a call in to the vendor, to see what is going on with the
encoding, but I still would like to get this to work.

I created soap.xml & the script above reads it, returning a
nodes.length = 10, so we are reading the file. When set node =
nodes.nextnode is executed, I receive an error ->Object doesn't support
this property or method: 'nextnode'<-, which id do not under stand.

Also, should set attrs = node.attributes be set attrs =
nodes.attributes (nodes with an 's')??

Thanks for all your help, I feel like I am being a real pain.
Larry...

Feb 2 '06 #14
lr*****@gmail.com wrote:
Bob,

I have put a call in to the vendor, to see what is going on with the
encoding, but I still would like to get this to work.

I created soap.xml & the script above reads it, returning a
nodes.length = 10, so we are reading the file. When set node =
nodes.nextnode is executed, I receive an error ->Object doesn't
support this property or method: 'nextnode'<-, which id do not under
stand.
The code I posted ran as-is. Perhaps there is a msxml2 version issue. Do you
have MS XML Parser 3.0 installed?

Instead of nextnode, try:

set node = nodes.item(i)

Also, should set attrs = node.attributes be set attrs =
nodes.attributes (nodes with an 's')??


No. We want to be looking at the attributes of the individual node. nodes
contains a list of nodes returned by the selectNodes statement which returns
a list of all the nodes that meet the criteria in the xpath statement.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 2 '06 #15
Bob,

set node = nodes.item(i), did the trick, I guess MS XML Parser 3.0 is
installed. I am waiting on the vendor to get back with me on the
encoding issue.

Thanks for all your help. If you are ever in New Orleans, look me up,
I owe you a beer.

Larry....

Feb 2 '06 #16
lr*****@gmail.com wrote:
Bob,

set node = nodes.item(i), did the trick, I guess MS XML Parser 3.0 is
installed. I am waiting on the vendor to get back with me on the
encoding issue.

So the code does not work with the xml returned from the web service? I was
thinking it might because this code:

response.contenttype="text/xml"
xmldom.save Response

allowed the xml to be parsed by the default xsl style sheet. Also, you
didn't seem to be getting an error when you used loadXML to create a new
domdocument

Oh, well.

You could do something like this:
Set xmldom = xmlhttp.responseXML
Set xml = Server.CreateObject("Msxml2.DOMDocument")
xml.loadXML Replace(Replace(xmldom.xml,"$gt;",">"),"&lt;","<")

and use the xml object instead of the xmldom object.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 2 '06 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: System | last post by:
Hello All, Redhat 9.0 Mysql 3.23.56 ==> Running I want to upgarde to 4.0.13 but this is the error it says: # rpm -Uvh MySQL-server-4.0.13-0.i386.rpm warning: MySQL-server-4.0.13-0.i386.rpm: V3...
8
by: Stephen | last post by:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored...
13
by: Joe Feldman | last post by:
This position is located in the South Bay Area in Northern California. If you are interested please send me your resume in a word .doc so that I can review it. If this does not look like a match,...
0
by: Cindy B | last post by:
Please send your resume and position to Cindy@AtlanticResource.com! I CAN NOT accept candidates that ARE OUTSIDE OF THE US! NO PHONE CALLS PLEASE! Email your resume to me! Position:SQL...
3
by: Wade | last post by:
I would like to install the .Net 1.1 framework on a Web Server running W2K to be able to run ASP.NET files, but I'm not sure where to find the files I need for the .Net framework. I have ".NET...
17
by: dingoatemydonut | last post by:
The C99 standard states: "In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce...
5
by: Steve | last post by:
Hi, I am sitting down to design our next set of internal apps. I would like to approach this in a way that would allow me to break logical parts of the application that handle specific tasks...
0
by: ultradiv | last post by:
I have a VB.NET application partly built that produces an xml output (just a file at present) I have a .NET webserver and SQLserver 2000 I need to be able to send the xml to the webserver/database...
28
by: Ian Davies | last post by:
Hello I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to...
37
by: C_guy | last post by:
Does anyone know of a (hopefully free) tool that can traverse a project and determine which "#include"s are not needed or needed in every .C file? This would be helpful in removing header...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.