getAllElementsByPath("item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>                <--- current MbElement
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>


getAllElementsByPath("order/item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">         <--- current MbElement
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>


getAllElementsByPath("../item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">     <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>         <--- current MbElement
    </order>
  </customer>
</data>


getAllElementsByPath("order//item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">         <--- current MbElement
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>


getAllElementsByPath("order/*");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">         <--- current MbElement
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>


getAllElementsByPath("//item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">         <--- current MbElement
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>


getAllElementsByPath(".//item");

If this method is called on the indicated MbElement object, the array of MbElements returned will contain the elements shown in red.

<data>
  <customer id="dfg12">
    <order>
      <date>
        9-9-2001
      </date>
      <item partnumber="56517"/>
      <item partnumber="64973"/>
    </order>
  </customer>
  <customer id="kth76">         <--- current MbElement
    <order>
      <date>
        11-6-2001
      </date>
      <item partnumber="53257">
        <substitute>
          <item partnumber="53876">
        </substitute>
      </item>
      <item partnumber="87465"/>
    </order>
  </customer>
</data>