Hey everybody,

I got another question. I have a dataSource from an .xml file, wich is
structured like this:

<selectedObjects>
    <title>a title</title>
    <view>a view</view>
...

The <selectedObjects> tag is an Array of Objects. In order to get a
specific value, I just can use the following js code:

var list = document.getElementById("theDataSource").object;
var selectedObjects = list.selectedObjects();
var view = selectedObjects[0].valueForKey("view");

So the variable view would become the value "a view". This works fine.

But how can I navigate through an Array, if the dataSource is more
structured, for example like this:

<selectedObjects>
<info>
    <title>a title</title>
    <view>a view</view>

I'm just not able to figure out, how to use the valueForKey function,
because it always just searches for a value in the first level! If I
would use it like shown at the top, the variable would get the value
"null".

Anybody with an idea?

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to