Pasring XML

Results 1 to 2 of 2

Thread: Pasring XML

  1. #1
    Ali Sedehi Guest

    Default Pasring XML

    hi everyone. I am attempting to parse XML ( the code is below). I am attempting to load the xml by using the ".loadxml(URL)", but i keep getting an error with this line:<BR>"Set propertyNodes = root.selectNodes("record")". the code is below, if anyone can help....<BR><BR>Dim xml As DOMDocument<BR>Dim jack As New Collection<BR><BR>Sub Main()<BR><BR> Set xml = New DOMDocument<BR> Call xml.loadXML(" p_address=")<BR><BR> <BR><BR>Dim root As IXMLDOMNode<BR>Set root = xml.documentElement<BR><BR><BR>&#039Dim node As IXMLDOMNode<BR>&#039For Each node In root.childNodes<BR>&#039 MsgBox node.Text<BR>&#039Next<BR>Dim i As Integer<BR>Dim propertyNodes As IXMLDOMNodeList<BR>Set propertyNodes = root.selectNodes("record")<BR>Dim item<BR>Dim x As record<BR><BR>For Each node In propertyNodes<BR> i = i + 1<BR> Set x = New record<BR> x.title = node.selectSingleNode("title").Text<BR> x.URL = node.selectSingleNode("url").Text<BR> x.Description = node.selectSingleNode("description").Text<BR> x.BidPrice = node.selectSingleNode("bidprice").Text<BR><BR> jack.Add x, CStr(i)<BR><BR>Next<BR><BR>For Each item In jack<BR><BR> MsgBox item.title<BR>Next<BR><BR><BR>End Sub<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Parsing XML

    you need to use XMLHTTP - full documentation in the xml SDK at<BR><BR>there&#039s also an article on ASP today ( about it<BR><BR>Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts