Parsing complex xml

I am working with cnc machine data reporting back in a complex xml structure.

image

The data is only generated when the component changes value. If a machine sits ideal, things like the path component won't report any data, but components such as ambient temperature senors may still report data. Point being, everything under DeviceStream is dynamic.

I'm interested in drilling down to the lowest level of data, things like pathfeedrate, line, etc. I'm currently doing this with an ungodly amount of if statements and feel like there has to be a better way to parse this.

If you want to see the structure for yourself, there is a demo at http://mtconnect.mazakcorp.com/

Parsing the XML is simple enough, an xml filter will do it. But you do not really explain what you want to do with the resulting data structure. What does "drilling down to" mean?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.