Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NfXML
Message
De
12/07/2016 10:34:34
 
 
À
12/07/2016 08:43:08
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Re: NfXML
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01638182
Message ID:
01638272
Vues:
162
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform