top of page

Walking with XPath

1. To work on XPath, we will start with an XML File. We will use the below XML File. For this example, we will use the site http://www.xpathtester.com/xpath to test the same. 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<items>

  <item id="1" available="yes"> 

    <name>iPhone 5 </name>

    <manufacturer>Apple Inc </manufacturer>

    <price>600 </price>

  </item>

  <item id="2" available="no"> 

    <name>iPhone 6 </name>

    <manufacturer>Apple Inc </manufacturer>

    <price>700 </price>

  </item>

  <item id="3" available="yes">

    <name>Moto X </name>

    <manufacturer>Motorola </manufacturer>

    <price>200 </price>

  </item>

  <item id="4" available="yes">

    <name>Moto G </name>

    <manufacturer>Motorola </manufacturer>

    <price>450 </price>

  </item>

  <item id="5">

    <name>Samsung S4 </name>

    <manufacturer>Samsung Corp </manufacturer>

    <price>550 </price>

  </item>

</items>

 

2. Goto the site and paste the XML. 

 

 

bottom of page