www.webdeveloper.com
Results 1 to 3 of 3

Thread: data request and display

  1. #1
    Join Date
    Feb 2003
    Posts
    17

    data request and display

    hi there!

    i'm new to xml, i only know the basics of it. been using it for 2 weeks now.

    the scenario:

    my current project requires me to access our affiliates data system using xml and display the gathered information on our site.

    our affiliate gave us a request structure,
    see below for example

    request structure: <catalogID> depends on a user input.

    "http://www.affiliatedomain.com/affiliate.jsp?xml=<parent>catalogID>111111</catalogID></parent>"

    response stucture is:
    <catalogs>
    <catalogname>name</catalogname>
    <cdID>111111</cd>
    <cdName>My CD</cdName>
    </catalogs>

    the problem:

    how will i display the gathered informations? and how will i declare the "request structure" in our site?

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,120
    I don't think you'll be able to do this using a browser(cross domainsecurity issue).
    You may want to try a stand alone aplication on the server side written php/java(jsp or servlet) and then load the results in a rowser window
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    37
    u could do this using Javascript...

    using the HTTPRequest object...u can post an XML file...to your client...and read the XML is response...

    Load the incoming XML in an XMLDOM object...use XSL to make it look "pretty"....and siplay it...there simple isnt it?? hehe....

    heres some sample code that does exatly what u want........

    SerHttp = new ActiveXObject("Msxml2.XMLHTTP");
    SerHttp.open(RequestMethod,ServiceRequest, false,
    "","");
    SerHttp.setRequestHeader("content-type","text/xml");
    SerHttp.send(InputXML);
    SerXML = new ActiveXObject("Microsoft.XMLDOM");
    SerXML.loadXML(SerHttp.responseText);

    FileData = SerXML.transformNode(XslXML);


    heres what the code does....Sends "InputXML" to "ServiceRequest"...gets the response....loads into XMLDOM...transforms it against an XSL "XslXML"

    HTH....

    Have fun...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles