0

I have multiple paths stored in an array in c#. I want to be able to create an xml document using these x-paths but I'm not quite sure how to do it. Here are some examples of the x-paths..

/B/Name/FirstName

/B/Name/LastName

/B/Name/MiddleName

/B/Job/Title

So the xml would look like this

<B>
  <Name>
    <FirstName>
    </FirstName>
    <LastName>
    </LastName>
    <MiddleName>
    </MiddleName>
  </Name>
  <Job>
    <Title>
    </Title>
  </Job>
</B>

Thanks for your help!

3
  • Are those paths in something like this string[] paths;? Commented Aug 8, 2017 at 1:10
  • that is correct, I have it in a string array Commented Aug 8, 2017 at 1:17
  • Very similar to this, but xml instead of json. Commented Aug 8, 2017 at 1:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.