Is it legal to have an xml file with a root node with the same name as a child node, but both with different name spaces? and if that is legal, how would you deserialize that?
For example, I get a file from my vendor with part of it as:
<?xml version="1.0" encoding="utf-16"?>
<CollisionForm xmlns:i="http://ift.tt/ra1lAU" z:Id="i1" xmlns:z="http://ift.tt/JiuCsN" xmlns="http://ift.tt/1rvKnQL">
<ChangeTracker z:Id="i2">
<ExtendedProperties />
<ObjectsAddedToCollectionProperties />
<ObjectsRemovedFromCollectionProperties />
<OriginalValues />
<State>Unchanged</State>
</ChangeTracker>
<CollisionCMVs />
<CollisionDiagrams />
<CollisionEnvironments>
<CollisionEnvironment z:Id="i3">
<ChangeTracker z:Id="i4">
<ExtendedProperties />
<ObjectsAddedToCollectionProperties />
<ObjectsRemovedFromCollectionProperties />
<OriginalValues />
<State>Modified</State>
</ChangeTracker>
<CollisionForm z:Ref="i1" />
it evidently does not like the fact that the last line above is the same as the Root node name. I was wondering if they are two different name spaces and there is some method of deserializing this based on the combination of the name space and the node name or something like that. I am using .net C#
No comments:
Post a Comment