ASP VB XML string extraction

Home Forums Scripting General Scripting ASP VB XML string extraction

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    topper
    Member
    #105458

    Guys,

    Wondering if anyone can help, I have an XML string which is returned from DB, and I would like to extract all the information for a single node, with tag points <SELECTIONSUMMARY> and </SELECTIONSUMMARY>

    I know sod all about XML so have taken to the task treating this as a standard string using standard string manipulation.

    This is the code I have in my page

    Code:
    <%
    sTemp = Recordset1.Fields.Item(”JobResults”).Value
    sNew = Mid(sTemp, InStr(sTemp, “<SELECTIONSUMMARY>”)+18, InStrRev (sTemp, “</SELECTIONSUMMARY>”))
    response.Write(sNew)
    %>

    I can get the start point correct and the text displayed starts at the correct point but I cannot get it to “cut off” all text after the closing tag. I have tried different variants using Len(sTemp) – InStrRev, but no difference.

    Any Ideas ?

    Cheers
    Topper

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.