jessevitrone
07-14-2003, 03:04 PM
I have an xml string that I have to parse that looks like this:
<data><text>Sample Text</text><price>9.00</price></data>
I'd like to be able to pull the data from that, and have it go into an array to look like this:
data["text"] = "Sample Text";
data["price"] = "9.00";
The problem is that "text" and "price" can be anything, and any number of sub elements in the <data> tags.
I know there are ways to do this with regular expressions, but I can't remember :(
Any suggestions?
Thanks in advance.
<data><text>Sample Text</text><price>9.00</price></data>
I'd like to be able to pull the data from that, and have it go into an array to look like this:
data["text"] = "Sample Text";
data["price"] = "9.00";
The problem is that "text" and "price" can be anything, and any number of sub elements in the <data> tags.
I know there are ways to do this with regular expressions, but I can't remember :(
Any suggestions?
Thanks in advance.