Multipart question: Mapping between xml and Json using xpath

Posted by scope-creep on Stack Overflow See other posts from Stack Overflow or by scope-creep
Published on 2010-05-23T03:19:33Z Indexed on 2010/05/23 3:31 UTC
Read the original article Hit count: 340

Filed under:
|
|
|

This is a JSON mapping question from a json newbie.

Currently i'm reading xml using xpath in C#, and the xpath are returning either the element or attribute node values, as is the schema's want. I want to write out some of the returned values into a json formatted file. I know i can faneigle the xpath expression to return the element or attribute names, so I can built the appropriate name/value json structure before serialization, but I was I'm wondering if their was some way of doing a mapping between the xml and json. The xml schema is fairly big, so potentially the mapping will be big, meaning a ton of cumbersom coding to make it work. Is their any way to automap somehow?

I was planning to use json.net, which seems flexible enough, although their may be a better approach.

Any help would be appreciated. Bob.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about JSON