Introduction to XPath and XML Path Language

an introduction to the xpath message n.w
1 / 15
Embed
Share

Discover what XPath and XML Path Language are, how they relate to XML, and their significance in accessing and navigating XML documents. Learn about the structure of XML elements and how to access content and attributes using XPath. Explore how to navigate through nested nodes and access node content with JSL messages in XML Path Language 1.0.

  • XPath
  • XML Path Language
  • XML elements
  • JSL messages

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. An Introduction to the XPath() Message

  2. What is XPath()? XPath() is a message sent to a platform s analysis or report layer. XPath() is an alternative method of accessing display tree objects. XPath() requires a single argument.

  3. What is XPath()? The argument is a string representing a query for an XML document written in the XML Path Language. What is XML? What does XML have to do with a JMP window?

  4. XML XML stands for the Extensible Markup Language. XML describes the content and organization of data. XML syntax is simple but powerful and flexible. Tags identify the start and end of a node: <tag> </tag> Attributes add metadata to a node: attribute="value" Content in a node can be a number or a string. An XML element comprises an opening tag and its attributes, the content, and a closing tag: <name lang="en">JMP</name> Elements may be nested for hierarchical organization.

  5. XML and JMP Windows Bivariate Platform Bivariate XML Representation <OutlineBox width="404" >Bivariate Fit of weight By height <ListBox leftOffset="14" > <PictureBox width="390" height="296"> <BorderBox width="390" height="296">

  6. See the XML for a JMP Platform Names Default to Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ) ); rpt = biv << Report; xml = rpt << Get XML; (Show full XML for Bivariate)

  7. XML Path Language 1.0 Navigate a path through the nested nodes (a branched tree of nodes). The navigation path is specified as a search string. The result is returned as a JSL list. Identify nodes in the tree (match the name of a tag). Returns reference to nodes (display boxes).

  8. XML Path Language 1.0 Access the content of a node with JSL messages to display boxes. Access attributes of a node. Compute with XML content using more than 200 built-in functions.

  9. XPath Syntax Select nodes from the root as an absolute path / // the current node that selection no matter where they are Select nodes in the document from matches the . Select the current node .. Select the parent of the current node @ Select the attribute

  10. XPath Predicates A predicate qualifies a node in the search. Predicates appear in square brackets like subscripts. Use XPath functions like last() or position(n) in predicates. Use tag attributes in Boolean expressions in predicates.

  11. XPath Wildcards * Match any element node @* Match any attribute node()Matches any node of any kind

  12. XPath Axes Represent Relationships to Nodes ancestor, ancestor-or- self following, following- sibling descendant, descendant-or-self preceding, preceding- sibling attribute namespace self parent, child axisname::node[predicat e]

  13. XPath Operators Operators perform arithmetic, Boolean comparisons, logical operations, or modulo division.

  14. XPath Functions See https://www.w3schools.com/xml/xsl_functions.asp More than 200 built-in functions are available Functions for returning numeric results (abs, ceiling, count) Functions work on string arguments and Unicode characters Functions on duration, date, and time Functions on sequences (lists)

  15. JSL Helpers object << Get XML result = XPath Query( "XML string" ) Get Display Path( report, expression , mode ) (This function is the same as of Show Properties > Box Path interactive feature)

Related


More Related Content