Altova XMLSpy 2025 Professional Edition

Copy XPointer/JSON-Pointer

Home Prev Top Next

The Copy XPointer/JSON-Pointer command is available in Grid View of XML and JSON documents and the Text View of XML documents. It copies to the clipboard an XPointer/JSON-Pointer expression that locates the selected node.

 

XML documents: The command creates an element() scheme XPointer to the currently selected node/s of the XML document and copies the XPointer to the clipboard. For example, the XPointer element(/1/3) selects the third child of the document element (or root element).

JSON documents: The command creates a JSON-Pointer to the currently selected node/s of the JSON document and copies the JSON-Pointer to the clipboard. For example, the JSON-Pointer /Artists/1/Albums/2/Tracks/3/Title selects a JSON node as follows: Lookup the first object of the top-level Artists array; in which, lookup the second object of the Albums array; in which, lookup the third object of the Tracks array; in which select the Title object.

 

Note the following points:

 

XML attributes cannot be represented using the element() scheme. If an attribute is selected, the XPointer of the attribute's parent element is generated.

If multiple XML elements are selected, then the XPointer of the first of these is generated.

If a JSON value is selected, the JSON-Pointer of the value's key is generated.

If multiple JSON nodes are selected, then the JSON-Pointer of the first of these is generated.

 

Note:The Copy XPointer/JSON-Pointer command can also be accessed via the context menu.

 

© 2018-2024 Altova GmbH