IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Loadxml method in HTM and ASP

  • 1.  Loadxml method in HTM and ASP

    Posted Thu October 24, 2002 11:01 AM

    I had three different results:

    1) http://SAG/load_xml.HTM?XMLforMe for









    result: XMLforMe+true+XMLforMe

    2) http://SAG/load_xml.ASP?XMLforMe for

    <!- LANGUAGE = JScript →
    <%@ LANGUAGE = JScript %>







    <%

    Request_ServerVariables=Request.ServerVariables(“QUERY_STRING”)

    function replace_X()
    {
    //alert(‘function replace_X()’)

    while (temp.indexOf(out)>-1)
    {
    pos= temp.indexOf(out)
    temp = “”
    +(temp.substring(0, pos)
    +add
    +temp.substring((pos + out.length), temp.length))
    }

    }

    out = “<” // replace this
    add = “&lt” // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    out = “>” // replace this
    add = “&gt” // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    out = “%20” // replace this
    add = " " // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”)
    xmlDoc.async = false;
    boolValue=xmlDoc.loadXML(‘XMLforMe’)
    //boolValue=xmlDoc.loadXML(Request_ServerVariables)
    xmlDoc_xml = xmlDoc.xml

    %>

    <%= Request_ServerVariables+‘+’+boolValue+‘+’+xmlDoc_xml %>




    result: XMLforMe+true+XMLforMe

    3) http://SAG/load_xml.ASP?XMLforMe for

    <!- LANGUAGE = JScript →
    <%@ LANGUAGE = JScript %>







    <%

    Request_ServerVariables=Request.ServerVariables(“QUERY_STRING”)

    function replace_X()
    {
    //alert(‘function replace_X()’)

    while (temp.indexOf(out)>-1)
    {
    pos= temp.indexOf(out)
    temp = “”
    +(temp.substring(0, pos)
    +add
    +temp.substring((pos + out.length), temp.length))
    }

    }

    out = “<” // replace this
    add = “&lt” // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    out = “>” // replace this
    add = “&gt” // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    out = “%20” // replace this
    add = " " // with this
    temp = “” + Request_ServerVariables // temporary holder
    replace_X()

    Request_ServerVariables = temp

    xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”)
    xmlDoc.async = false;
    //boolValue=xmlDoc.loadXML(‘XMLforMe’)
    boolValue=xmlDoc.loadXML(Request_ServerVariables)
    xmlDoc_xml = xmlDoc.xml

    %>

    <%= Request_ServerVariables+‘+’+boolValue+‘+’+xmlDoc_xml %>



    result: XMLforMe+false+

    Why?

    Thank for attension.
    :eek:


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: Loadxml method in HTM and ASP

    Posted Thu October 31, 2002 12:56 PM