Preserving the parent element in XML document with… – Cloudera Community

When using the XMLReader service, how do you retain the outermost parent element of an XML document so when I convert it to JSON I have the outermost element in the JSON version too?

 

For example, given the following XML document how do I capture the “<a>” element rather than just the “<b>” element?  

 

<a>
<b>45</b>
</a>

 

What I want:

{"a": {"b":45}}

 

What I get:

{"b":45}

 

Read more here: Source link