How to query an XML File with E4X in AS3?

Posted by yens resmann on Stack Overflow See other posts from Stack Overflow or by yens resmann
Published on 2010-05-07T07:45:03Z Indexed on 2010/05/07 7:48 UTC
Read the original article Hit count: 182

Filed under:
|
|
|
|

I need to archive a database-driven flash as3 website. I exported a table to xml so now i have something like this:

<RECORDS>
  <RECORD>
    <id>home</id>
    <msg>bodytext</msg>
    <type>0</type>
    <lastEditDate>0000/0/0 00:00:00</lastEditDate>
    <lastAccessDate>2009/6/17 11:37:21</lastAccessDate>
    <timesAccessed>855</timesAccessed>
  </RECORD>
  <RECORD>
    <id>contact</id>
    <msg>contact body text</msg>
    <type>0</type>
    <lastEditDate>0000/0/0 00:00:00</lastEditDate>
    <lastAccessDate>2010/5/6 20:40:46</lastAccessDate>
    <timesAccessed>831</timesAccessed>
  </RECORD>
</RECORDS>

Now I would like to select the RECORD where id is set to home.

In SQL: SELECT * FROM table WHERE id='home'

How can i do the same thing with E4X for AS3 ?

© Stack Overflow or respective owner

Related posts about as3

Related posts about Xml