>Hi Antonio, the resulting modification gives you an incorrect result;
>
>As I explained before, you ended up with a name collision that
> tell the parser that properties:
> a:branch,branch and @branch
>are:
>branch,branch,branch
>
>and they ended up converted to array ( wrong result ).
>
>No way you can get rid of namespaces... unless
>all the elements in the document belong to the same
>namespace.
Marco, I said "get rid of prefixes", not "get rid of namespaces". Prefixes are only a local convenience for the encoding of the XML document, they shouldn't survive or be part of the serialization into other system.
Namespaces, on the other hand, must be determinant to the serialization of the document and that's why I think it's very important to explicitly map each serialized document component (elements and attributes) to its namespace.
The three "branch" that are descendant of root.root, if that's what you're referring to, must be serialized as an array and are serialized as array elements on purpose, since they share the same name. It's your solution and I think it is a very good one. Where's the collision? They have different namespaces so there is no collision at all and their values and sub-trees can be distinctively accessed.
I'm PMing you the current version of nfxmlread as edited to get this kind of output.
----------------------------------
António Tavares Lopes