OpenXML same named nodes at same level

Copper Contributor

Good Morning,

 

I have a question.  I have an export from a survey tool where the same question (element name) exists in more than one branch of the survey.  When the results are returned, I get an empty node for the branch the user did not encounter and a populated node for same named element that the user did encounter.   When using OpenXML, I get just the first empty node and not the one with data.

 

Is there a way to do this using OpenXML?

If I used nodes method, you should know that the structure is

<root>

<survey>

<id>12345</id>

<col1/>

<col1>1</col1>

<col2/>

<col3/>

</survey>

</root>

 

I should add that any column could exist in more than one branch.  So, the approach should be able to anticipate the following:

 

At the same level as the identifier, a column may exists one or more times and may not have a response.  If there is a response, we want to use that.

 

Thank you,

 

- N

0 Replies