Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's say you wanted to select the <code>value</code> element that is a child of the <code>attribute</code> whose name is "Employee Name".</p> <p>The XPath expression for that is the following:</p> <pre><code>/attributes/attribute[@name="Employee Name"]/value </code></pre> <p>In XSL you can use it like this:</p> <pre><code>&lt;xsl:value-of select="/attributes/attribute[@name='Employee Name']/value"/&gt; </code></pre> <p>It's built up the following way. First you want to select a <code>value</code> attribute, whose parent is an <code>attribute</code> element, whose parent is the root (I'm assuming) <code>attributes</code>. The <code>/</code> operator indicates the parent-child relationship between elements. So an expression to select <em>all</em> <code>value</code> elements would be the following:</p> <pre><code>/attributes/attribute/value </code></pre> <p>With that as a base, you want to filter the result by some other attribute. In this case, you want to filter by the <code>name</code> attribute of the <code>attribute</code> element (your choice of names might make things hard to follow). Filtering is done with <code>[]</code> clauses on the elements you want to filter by. In your case that's the <code>attribute</code> element:</p> <pre><code>/attributes/attribute[]/value </code></pre> <p>Now you need to put something in the filter. The <code>@</code> symbol indicates attributes of the element you're filtering by, followed by the name of the attribute you want. Then you compare the attribute to some known value, to arrive at the above expression:</p> <pre><code>/attributes/attribute[@name='filter']/value </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload