Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    58

    Lightbulb Unanswered: load table with data from xml file

    Hi,
    I have data in the following xml file mydata.xml:

    <DATA>
    <RECORD datevalue="01.01.2003 10:00" mwh="0,001" />
    <RECORD datevalue="01.01.2003 10:05" mwh="0,002" />
    <RECORD datevalue="01.01.2003 10:10" mwh="0,001" />
    <RECORD datevalue="01.01.2003 10:15" mwh="0,003" />
    <RECORD datevalue="01.01.2003 10:20" mwh="0,001" />
    </DATA>


    Set SourceObj = Server.CreateObject("MSXML2.DOMDocument.4.0")
    SourceObj.async = false
    SourceObj.setProperty "SelectionLanguage", "XPath"
    filename = Server.MapPath("mydata.xml")

    SourceObj.load(filename)

    set ar1 = SourceObj.documentElement.selectNodes
    ("//RECORD/@datevalue")
    set ar2 = SourceObj.documentElement.selectNodes("//RECORD/@mwh")

    I want to do the following:

    To store in my two tables tab1 and tab2 with data from ar1 and ar2 without using a LOOP
    I use the JOIN function
    tab1 = Join(ar1, ',')
    tab2 = Join(ar2, ',') but dont work

    Can any one give me a idea or some links do it without ?

    Thand you for your suggestion

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    what exactly are you trying to achieve??

    If you are trying to output your xml in a table format why don't you transform it using an xsl?

Posting Permissions

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