Hi,

I have an application that's loading values as XML from a text file on
startup.
I can see the data displayed fine, but I need to get it into an array to
work with.

the code:

        // returns XML data as
"<response><string>...</string><string>...</string></response>
        $.post("proc_loadhistory.php",{}, function(xml){
                rawxml = $("string",xml).text();  // get text of each 
<string></string>
                $('#output').html(rawxml);  // displays ALL <string>s clumped 
together

outputs:

        "data1data2data3..."

Soo... I need to be able to save this data (rawxml) in an array I can work
with so that I can access individual <string> records by number (such as
mystring[2] for the 3rd value).

e.g.

        // output value in second <string> field
        $("#button2").click(function(){
                $('#output').html('rawxml[1]');   // <-- doesn't work, just an 
example of
what i need
        });

Tried googling and scanning the docs, couldn't find anything.

Can someone point me in the right direction?
Thanks.

________
SEAN O
-- 
View this message in context: 
http://www.nabble.com/xml---javascript-help-requested-tf2522700.html#a7037061
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to