Querying by XML data value in Javascript??

Discussion in 'OT Technology' started by anjego, Jul 27, 2005.

  1. anjego

    anjego Invading your economy!

    Joined:
    Jul 15, 2002
    Messages:
    33,270
    Likes Received:
    0
    Location:
    Chicago
    hey yall..

    i'm trying to figure out how to treat my xml nodes like a literal database, where i can look up a particular node based on a data value inside of it. is this possible?

    an example XML file would be like this:
    Code:
    <apples>
      <apple code="GREEN" size="15"/>
      <apple code="RED" size="12" />
    </apples>
    
    i want to send a query looking for an apple node with the property of green. and then return the array location of that particular node (so then i could access other properties of that node).

    i know that this isn't exactly the way that XML is designed to be used, but is it possible?
     
  2. anjego

    anjego Invading your economy!

    Joined:
    Jul 15, 2002
    Messages:
    33,270
    Likes Received:
    0
    Location:
    Chicago
    so, OT only knows about video games?
     

Share This Page