1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

XML to HTML

Discussion in 'XML & RSS' started by powerbfore, Mar 6, 2012.

  1. #1
    Ok I didn't know if i should post this on the xml section or javascript, so sorry.

    Ok so I've looked up on how to do it and I found w3schools' example
    w3schools.com/xml/xml_to_html.asp

    the only problem is that my xml looks like this

    <dir name="92.img">    <dir name="main">
            <int name="attribute 1" value="1"/>
            <int name="attribute 2" value="1"/>
            <int name="attribute 3" value="15"/>
            <int name="integer" value="-65"/>
            <float name="fs" value="10.0"/>
            <int name="model" value="3"/>
            <int name="ItemType" value="1"/>
            <int name="category" value="1"/>
            <string name="XType" value="1N"/>
        </dir>
    </dir>
    Code (markup):
    now how would I go about making the exact same duplicate of w3schools' example with this xml?
    And I mean the table to look like:
    [TABLE="class: grid, width: 0"]
    [TR]
    [TD]attribute 1[/TD]
    [TD]1[/TD]
    [/TR]
    [TR]
    [TD]attribute 2[/TD]
    [TD]1[/TD]
    [/TR]
    [TR]
    [TD]integer[/TD]
    [TD]-65[/TD]
    [/TR]
    [/TABLE]

    and so on.
     
    powerbfore, Mar 6, 2012 IP