SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Israel, Tel Aviv
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation How can i display this xml file with xmldom ?

    How can i display this xml file with xmldom (on asp page) ?
    [VBS]
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ProductInfo xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xml.amazon.com/schemas/dev-lite.xsd">
    - <Details url="http://www.amazon.com/exec/obidos/redirect?tag=webservices-20%26creative=DGHG1TOIPPPLN%26camp=2025%26link_code=xm2%26path=ASIN/B00005Y3ZV">
    <Asin>B00005Y3ZV</Asin>
    <ProductName>Commandos 2: Men of Courage</ProductName>
    <Catalog>Video Games</Catalog>
    <ReleaseDate>30 August, 2002</ReleaseDate>
    <ImageUrlSmall>http://images.amazon.com/images/P/B0...1.THUMBZZZ.jpg</ImageUrlSmall>
    <ImageUrlMedium>http://images.amazon.com/images/P/B0...1.MZZZZZZZ.jpg</ImageUrlMedium>
    <ImageUrlLarge>http://images.amazon.com/images/P/B0...1.LZZZZZZZ.jpg</ImageUrlLarge>
    <OurPrice>$49.99</OurPrice>
    <UsedPrice>$37.5</UsedPrice>
    </Details>
    </ProductInfo>

    [/VBS]
    Last edited by Shinza; Sep 23, 2002 at 07:22.

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,254
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    Do you have a style sheet or an XSL document to run it against?

    If you use a style sheet, all you do is include a line like this in your XML:
    <?xml-stylesheet type="text/css" href="cd_catalog.css"?>

    If using an XSL document, then you would do something like this:
    Code:
    Code (JavaScript): 
    <script> 
       xmldoc = new ActiveXObject("Microsoft.XMLDOM"); 
       xmldoc.async = false; 
       xmldoc.load("beers.xml"); 
    
       xsldoc = new ActiveXObject("Microsoft.XMLDOM"); 
       xsldoc.async = false; 
       xsldoc.load("beers.xsl"); 
    </script> 
    
    <script> 
       document.write(xmldoc.transformNode(xsldoc)); 
    </script>
    If you want a good reference list for XMLDOM methods/properties, may I suggest using devguru. The direct link to the DOM reference is:
    http://www.devguru.com/Technologies/...dom_index.html
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style


Bookmarks

Posting Permissions

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