Results 1 to 2 of 2

Thread: Javascript and xml

  1. #1
    Join Date
    Nov 2010
    Posts
    7
    Thanks
    0
    Thanked 2 Times in 1 Post

    Default Javascript and xml

    So I'm having an issue I need to work with an xml file, personally I don't like how it's laid out but I have no choice but to use it there's no changing it. Anyways I need to pull out certain values such as:

    <RECORDS>
    <RECORD>
    <ROW
    NAME="SOMETHING"
    AMOUNT="24.50"
    QUANTITY="10"
    OPERATIONDATE="20101108"
    />
    </RECORD>
    </RECORDS>

    Anyways I am unable to access it using getElementsByTagName("ROW")[0].childNodes[0].nodeValue;
    I'm sure it's something stupid I'm missing but I need to access the amount value. Any help would be much appreciated.

  2. #2
    Join Date
    Nov 2010
    Posts
    7
    Thanks
    0
    Thanked 2 Times in 1 Post

    Default

    Well for anyone that's interested what I was missing was getElementsByTagName("ROW").getAttribute("AMOUNT");
    searched for 2 days for that lol

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
  •