More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Posted: Fri Jun 17, 2022 12:12 pm
If I have an XML sample containing JSON e.g.
then, in XPath 3.1 or XQuery 3.1 I can write path expressions constructing XML "on the fly" with e.g. expressions like
However, if I do that in the XPath selector input or even in the XPath/XQuery builder and evaluate the expression, the result I get displayed is nothing more like
Is there some way to have the result pane show the actual document e.g.
without using e.g. `!serialize()` additionally in the XPath expression?
I understand the XPath input and XPath/XQuery builder, for paths selecting nodes in the input XML, just highlight the selected nodes in the editor pane so there you can see the visual representation of the result evaluation, but I wonder whether, with XPath 3.1 where we can construct nodes on the fly with json-to-xml and parse-xml/parse-xml-fragment, there shouldn't be some way to see the actually created nodes.
Code: Select all
<root>{
"key": "val"
}</root>
Code: Select all
/root/json-to-xml(.)
Code: Select all
Description: #document
XPath location: /
Code: Select all
<map xmlns="http://www.w3.org/2005/xpath-functions"><string key="key">val</string></map>
I understand the XPath input and XPath/XQuery builder, for paths selecting nodes in the input XML, just highlight the selected nodes in the editor pane so there you can see the visual representation of the result evaluation, but I wonder whether, with XPath 3.1 where we can construct nodes on the fly with json-to-xml and parse-xml/parse-xml-fragment, there shouldn't be some way to see the actually created nodes.