msg1 {
max0matic[+],
posted: 12.07.04 9a•12.08.04 3a,
top [^]
}
I did write XMLSA... that does both ways XML->Obj->XML
But somethimes this is to much and I didn't update it for ages..
anyway... I found this little proto from J.Milkins usefull
but I tweaked it a little with my knowlege gained on the XMLSA development...
so check this out:
added Array notation in any case [i}* This makes things very easy and generic to handle.
* We avoid have testing the typeof node (array/object)[/i]
grouped all attributes under "attributes" so nodenames and attribs can have the same name
added resolver to acces first Array element if none is given resolvers are some extra code that gets executed on shortcut
to avoid them use a strict notation node[num].node[num]
added the proto to XMLNode rather then XML more generic...in the future it will perhaps be XMLSA2
Okay so what's possible now? Let me give you some examples...
lets assume you have a xmlfile like this:
Now some example to acces the data:
msg2 {
max0matic[+],
posted: 12.07.04 11a•12.08.04 2a,
top [^]
}
reserved for exennsions
comments are welcome
msg3 {
JasonM[+],
posted: 12.11.04 11a•12.11.04 11a,
top [^]
}
... Nice one maxomatic
msg4 {
indivision[+],
posted: 01.20.05 6p•-,
top [^]
}
Very nice work. '__resolve' seems to be the silver bullet for the array problem previously discussed. Does anyone know if '__resolve' is going to continue support in future players as is or will there be a more official methodology for this. I looked through MM's site and couldn't determine if this property has been updated in AS2.0 or if it is still supported.
Also, I see you extended the attributes into their own object in order to avoid name conflicts with nodes. Is there any additional reason to do this that you have in mind, beyond avoiding name conflicts?
msg5 {
indivision[+],
posted: 02.17.05 6p•02.17.05 6p,
top [^]
}