This content has been marked as final. Show 3 replies
The best way to handle issues like this is to approach it a node at a time.
First, trace the root node as you have done.
then get a ref to the next node in the path you want, ad trace it, and so forth.
I can' tell from the xml you posted, but I suspect Worksheet is not a first level child of Workbook.
I opened the XML file in an external editor to have a look at the node names.
The watch window shows the node name I am trying to access as Worksheet but the external editor showed it as ss:Worksheet:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" ... >
<ss:Worksheet ss:Name="Annual Average __ Exchange rate">
Can't find anything about referencing nodes with colons in the middle, cannot trace(yearData.ss:Worksheet); or trace(yearData.ss);
The xml file is an xml export from an excel spreadsheet using openoffice 2.1.
This is called a namespace. It adds a level of complexity to accessing the data. Read up on xml namespace (as differentiated from component package namespace).
I have a simple example on www.cflex.net, Ben Clinkinbeard posted an excellent article on his blog. I am not at a machine with easy access to those urls, but google should find them.
As I recall, the double colon is used with namespaces:
yearList = yearData.ss::Worksheet