XPath command does not display resulting xml results
See original GitHub issueI will reference the BNF grammar below to make the description of the issue as precise as possible:
[39] element ::= EmptyElemTag | STag content ETag [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
In general terms the BNF grammar for xml defines that an element is defined as a “start tag” followed by some “content” followed by an “end tag”.
When executing the xpath command where the resulting element’s content is “CharData”, the results are displayed accurately.
However when executing the xpath command where the resulting element’s content is another “element” the results take an odd display form. It appears to be a value printout instead of displaying the snippet of xml.
Consider the sample xml:
<giftBasket>
<apple>Macintosh</apple>
<apple>Granny Smith</apple>
<oranges>
<origin>florida</origin>
<quantity>3</quantity>
</oranges>
</giftBasket>
If you run an xpath on //apple you will get the following for the displayed results (good): [Line 2] apple: Macintosh [Line 3] apple: Granny Smith
However if you run an xpath on //oranges you will get the following odd result displayed (bad): [Line 4] oranges: florida 3
What I think should be displayed is: [Line 4] oranges:
<oranges>
<origin>florida</origin>
<quantity>3</quantity>
</oranges>
I will say it would also be nice if the results initially just displayed as a list of results that were collapsed with pluses on the left hand side of each result. Clicking the plus itself would show the snippet of xml where as clicking anywhere else in the row that is displaying the line number would bounce the cursor to that line number in the file. In this way the results pane for the xpath expression would be very useful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6
Top GitHub Comments
Hello, I have the same problem. It will be useful to diplay the results as an xml tree. Will this issue be treated ?
Thank you
still an issue…