Record-access command examples for XML parsing?
Record-access command examples for XML parsing?
- Subject: Record-access command examples for XML parsing?
- From: email@hidden
- Date: Wed, 24 Apr 2002 10:03:36 EDT
I'm trying to pull out XML data using the XML Scripting Addition OSAX, and finally got it to pull in data from my web-site. It comes back looking like this:
{class:XML document, XML tag:"cpe_info", XML contents:{{class:XML element, XML tag:"cpe_type", XML contents:{"DSL PPPoE Router"}}, {class:XML element, XML tag:"cpe_manufacturer", XML contents:{"ABC Inc"}}, {class:XML element, XML tag:"cpe_model", XML contents:{"PPPoE"}}, {class:XML element, XML tag:"serial_number", XML contents:{"00012356B"}}, {class:XML element, XML tag:"hardware_ver", XML contents:{"00009912"}}, {class:XML element, XML tag:"software_ver", XML contents:{"001"}}, {class:XML element, XML tag:"error_no", XML contents:{"0000000"}}, {class:XML element, XML tag:"error_desc", XML contents:{"NO ERROR"}}}}
Here's where I get hung up. According to the notes for the XML parser, "All elements of the returned structure can be accessed using standard AppleScript record access techniques. Note that attributes are stored as user properties. "
I'm having problems getting my syntax set up properly in Applescript "record access" lingo. For instance, if I wanted to pull out the XML data listed under "cpe_model", above, can someone tell me what record-access command would do that?
- Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.