<?php
$XMLResult = '
<root>
<a href="https://google.com/">google.com</a>
<a href="https://bing.com/">bing.com</a>
<a href="https://yahoo.com/">yahoo.com</a>
</root>';
$XML = simplexml_load_string($XMLResult);
$XMLResults = $XML->xpath('/root/a/@href');
foreach($XMLResults as $SimpleXMLElement) {
var_dump(strval($SimpleXMLElement['href']));
}
string 'https://google.com/' (length=19)
string 'https://bing.com/' (length=17)
string 'https://yahoo.com/' (length=18)
<div>
<p>par</p>
<strong>strong</strong>
<divd>
<p>divpar</p>
</divd>
<blockquote>
<p>bqpar <strong>bqparstrong</strong></p>
</blockquote>
</div>
//p[name(ancestor::blockquote[1]) != 'blockquote']|//strong[name(ancestor::blockquote[1]) != 'blockquote']|//blockquote
Element='<p>par</p>'
Element='<strong>strong</strong>'
Element='<p>divpar</p>'
Element='<blockquote><p>bqpar <strong>bqparstrong</strong></p></blockquote>'
<informationsystem>
<informationsystem_group>
<name>name1</name>
<informationsystem_group>
<name>name2</name>
<informationsystem_group>
<name>name3</name>
</informationsystem_group>
</informationsystem_group>
</informationsystem_group>
<informationsystem_group>
<name>name4</name>
<informationsystem_group>
<name>name5</name>
</informationsystem_group>
<informationsystem_group>
<name>name6</name>
</informationsystem_group>
<informationsystem_group>
<name>name7</name>
</informationsystem_group>
<informationsystem_group>
<name>name8</name>
</informationsystem_group>
</informationsystem_group>
<informationsystem_group>
<name>name9</name>
<informationsystem_group>
<name>name10</name>
</informationsystem_group>
<informationsystem_group>
<name>name11</name>
</informationsystem_group>
</informationsystem_group>
</informationsystem>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" encoding="utf-8" version="1.0"/>
<xsl:template match="/informationsystem">
<xsl:if test="count(informationsystem_group) > 0">
<ul>
<xsl:apply-templates select="informationsystem_group"/>
</ul>
</xsl:if>
</xsl:template>
<xsl:template match="informationsystem_group">
<li>
<xsl:value-of select="name"/>
</li>
<xsl:if test="count(informationsystem_group) > 0">
<li>
<ul>
<xsl:apply-templates select="informationsystem_group"/>
</ul>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<ul>
<li>name1</li>
<li>
<ul>
<li>name2</li>
<li>
<ul>
<li>name3</li>
</ul>
</li>
</ul>
</li>
<li>name4</li>
<li>
<ul>
<li>name5</li>
<li>name6</li>
<li>name7</li>
<li>name8</li>
</ul>
</li>
<li>name9</li>
<li>
<ul>
<li>name10</li>
<li>name11</li>
</ul>
</li>
</ul>
//div[@class="spec"]//table/tbody/tr/td[1]
//div[@class="spec"]//table/tbody/tr/td[2]