Here's a short excerpt of my much larger XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<children text="TAC Net" dn="OU=TAC Net,DC=foobarbaz,DC=com">
<children text="Broker Voting System" dn="OU=Broker VotingSystem,OU=TACNet,DC=foobarbaz,DC=com">
<children text="Broker Vote" dn="OU=Broker Vote,OU=Broker Voting System,OU=TAC Net,DC=foobarbaz,DC=com"/>
</children>
</children>
Here's what the web site returned:
Code:
{
children:{
text:'TAC Net',
dn:'OU=TAC Net,DC=foobarbaz,DC=com',
children:{
text:'Broker Voting System',
dn:'OU=Broker VotingSystem,OU=TACNet,DC=foobarbaz,DC=com',
children:{
text:'Broker Vote',
dn:'OU=Broker Vote,OU=Broker Voting System,OU=TAC Net,DC=foobarbaz,DC=com'
}
}
}
}
And here's what the tree requires:
Code:
[{
text:'TAC Net',
dn:'OU=TAC Net,DC=foobarbaz,DC=com',
children:[{
text:'Broker Voting System',
dn:'OU=Broker VotingSystem,OU=TACNet,DC=foobarbaz,DC=com',
children:[{
text:'Broker Vote',
dn:'OU=Broker Vote,OU=Broker Voting System,OU=TAC Net,DC=foobarbaz,DC=com'
}]
}]
}]
Note all the extra square brackets to tell the tree things are arrays - even single element arrays must be enclosed in brackets. The Java code from json.org doesn't even put brackets around single element arrays, but Ext trees expect them :-(.
I can't use an XMLReader or TreeReader because (I *believe*) they will require XMLHTTPRequest, which requires a web server. I *can't* install a web server, so I have to have a static way to load a tree from XML or JSON.
Rgds,
Bret