I am working on a project where by I am getting an xml feed from a site using the below code:
which is returning an xml document:
<?xml version="1.0" ?>
<results name="processdocument">
<METAS>
<META>
<ATTRIB NAME="CONTENT">Results1</ATTRIB>
<ATTRIB NAME="SCHEME">WEB</ATTRIB>
</META>
<META>
<ATTRIB NAME="CONTENT">Results2</ATTRIB>
<ATTRIB NAME="SCHEME">NEWS</ATTRIB>
</META>
</METAS>
</results>
now I need to get this information into something I can work with, ie lloking around the nodes checking what they are and assigning them to a variable, but I am completely confused about how to go about this,
please help
Cheers
tim
Code:
Dim objXMLHTTP, xml, toSend
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
toSend = "<?xml version=""1.0"" ?>"&VbCrLf
toSend = toSend&"<!DOCTYPE web-app PUBLIC ""-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"" ""[URL unfurl="true"]http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"">"&VbCrLf[/URL]
toSend = toSend&"<document>"&VbCrLf
toSend = toSend&"<title>"&name&"</title>"&VbCrLf
toSend = toSend&"<body>"&VbCrLf
toSend = toSend&""&description&""&VbCrLf
toSend = toSend&"</body>"&VbCrLf
toSend = toSend&"<partner>PARTNERNAME</partner>"&VbCrLf
toSend = toSend&"</document>"
xml.Open "POST", "[URL unfurl="true"]http://websitetogetinfo/categorise.pl",[/URL] False
xml.Send "XML_INPUT="&toSend
Response.Write "<textarea style=""width:480px; height:100px"">"&xml.responseText&"</textarea>"
Set xml = Nothing
which is returning an xml document:
<?xml version="1.0" ?>
<results name="processdocument">
<METAS>
<META>
<ATTRIB NAME="CONTENT">Results1</ATTRIB>
<ATTRIB NAME="SCHEME">WEB</ATTRIB>
</META>
<META>
<ATTRIB NAME="CONTENT">Results2</ATTRIB>
<ATTRIB NAME="SCHEME">NEWS</ATTRIB>
</META>
</METAS>
</results>
now I need to get this information into something I can work with, ie lloking around the nodes checking what they are and assigning them to a variable, but I am completely confused about how to go about this,
please help
Cheers
tim