-
Notifications
You must be signed in to change notification settings - Fork 1
QIF document addition removes XML nodes #270
Comments
This should work, it may be something in the parser when it translates it to the internal structure. This was added to provide a json representation instead of a raw xml document. Looks nicer if you request json. I’ll get back soon. At the ROS meeting in Detroit this week, so will be a little slow getting to it. BestW(Sent from mobile)On May 24, 2023, at 05:34, Matt Powley ***@***.***> wrote:
Need help pointing me to how I can fix this issue.
When adding a XML QIF Results document, nodes with the same name in the document are not stored.
In QIF a file multiple child nodes exist with the same name. In the excerpt below, there are multiple 'CircleFeatureDefinition' nodes, each with different child nodes and attributes.
<Features>
<FeatureDefinitions n="2">
<CircleFeatureDefinition id="4">
<Attributes n="4">
<AttributeQPId name="AP242:PersistentFeature:UUID" value="be620693-2cd7-49b8-998d-e098a46a163a" />
<AttributeI1 name="Renishaw:DataCollector:FeatureId" value="1" />
<AttributeI1 name="Renishaw:DataCollector:FeatureType" value="103" />
<AttributeStr name="Renishaw:DataCollector:FeatureTypeDescription" value="InspectionPlus Bore (3Pt)" />
</Attributes>
<InternalExternal>INTERNAL</InternalExternal>
<Diameter>5.000000</Diameter>
</CircleFeatureDefinition>
<CircleFeatureDefinition id="20">
<Attributes n="4">
<AttributeQPId name="AP242:PersistentFeature:UUID" value="6f6e0701-e6ad-4c46-afcb-f77084e1d42d" />
<AttributeI1 name="Renishaw:DataCollector:FeatureId" value="2" />
<AttributeI1 name="Renishaw:DataCollector:FeatureType" value="103" />
<AttributeStr name="Renishaw:DataCollector:FeatureTypeDescription" value="InspectionPlus Bore (3Pt)" />
</Attributes>
<InternalExternal>INTERNAL</InternalExternal>
<Diameter>5.000000</Diameter>
</CircleFeatureDefinition>
</FeatureDefinitions>
</Features>
When the data is sent to the agent through a multi-line SHDR all data is present. When processing however each of the nodes is turned into a property of the QifDocumentWrapper entity. This property collection is a map and so it can only have 1 child property value with the same name.
So any XML that has the form:
<Parent>
<Child name="Child1"/>
<Child name="Child2"/>
<Child name="Child3"/>
</Parent>
Will end up with only one 'Child' property and will have an attribute 'name' with the value 'Child1'.
How best to modify the data parsing pipeline to retain the structure?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi Matt, Do you have the complete QIF document? I'm trying to build a unit test around this and need to have a sample. I think the parser treats the content like a property set instead of a list. I use a generic entity mapper to create the QIF document; I don't have a complete internal model for QIF–maybe sometime in the future–to do validation. Therefore it is probably makeign some poor assumptions. There are some other areas this pattern is used, like extended schema, so I need to verify I can differentiate behavior. A complete example would be very helpful. Thanks, |
@wsobel - I will catch up with you in person next week. |
Need help pointing me to how I can fix this issue.
When adding a XML QIF Results document, nodes with the same name in the document are not stored.
In QIF a file multiple child nodes exist with the same name. In the excerpt below, there are multiple 'CircleFeatureDefinition' nodes, each with different child nodes and attributes.
When the data is sent to the agent through a multi-line SHDR all data is present. When processing however each of the nodes is turned into a property of the QifDocumentWrapper entity. This property collection is a map and so it can only have 1 child property value with the same name.
So any XML that has the form:
Will end up with only one 'Child' property and will have an attribute 'name' with the value 'Child1'.
How best to modify the data parsing pipeline to retain the structure?
The text was updated successfully, but these errors were encountered: