如何在PHP中读取特殊的XML文件?

时间:2015-01-30 11:46:49

标签: php xml

我有一个特殊的XML文件,XML文件的含义如下:

<b title="FunctionalCI">ApplicationSolution</b>::42<br/>
<ul class="treeview">
<li>Name = Sep11</li>
<li>Description = <div ></div></li>
<li>Organization = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=Organization&id=4&" title="Organization::4">test</a></li>
<li>Organization name = test</li>
<li>Business criticity = <span title="high">high</span></li>
<li>Move to production date = 2014-12-31</li>
<li>Contacts = </li>
<li>Documents = </li>
<li>Application solutions = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=ApplicationSolution&id=53&" title="Application Solution::53">Sep Engine CO04</a>, 53 42, Sep Engine CO04, Sep11</li>
<li>Provider contracts = </li>
<li>Services = </li>
<li>Softwares = </li>
<li>Tickets = </li>`
<li>CIs = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=FunctionalCI&id=50&" title="Functional CI::50">Sep Console05</a>, 42 50, Sep11, Sep Console05<br/><a href="http://localhost/itop/web/pages/UI.php?operation=details&class=FunctionalCI&id=53&" title="Functional CI::53">Sep Engine CO04</a>, 42 53, Sep11, Sep Engine CO04</li>
<li>Business processes = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=BusinessProcess&id=44&" title="Business Process::44">Business Process</a>, 44 42, Business Process, Sep11</li>
<li>Status = <span title="active">active</span></li>
<li>map level = 2</li>
<li>CI Type = Application Solution</li>
<li>Friendly name = Sep11</li>
<li>Organization = test</li>
</ul>
<b title="FunctionalCI">WebApplication</b>::50<br/>
<ul class="treeview">
<li>Name = Sep Console05</li>
<li>Description = <div ></div></li>
<li>Organization = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=Organization&id=4&" title="Organization::4">test</a></li>
<li>Organization name = test</li>
<li>Business criticity = <span title="low">low</span></li>
<li>Move to production date = 2014-12-31</li>
<li>Contacts = </li>
<li>Documents = </li>
<li>Application solutions = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=ApplicationSolution&id=42&" title="Application Solution::42">Sep11</a>, 42 50, Sep11, Sep Console05</li>
<li>Provider contracts = </li>
<li>Services = </li>
<li>Softwares = </li>
<li>Tickets = </li>
<li>Web server = <a href="http://localhost/itop/web/pages/UI.php?operation=details&class=WebServer&id=46&" title="Web server::46">Apache http server INFRAVICO05</a></li>
<li>Web server name = Apache http server</li>
<li>URL = <a target="_blank" href=""></a></li>
<li>map level = 3</li>
<li>CI Type = Web Application</li>
<li>Friendly name = Sep Console05</li>
<li>Organization = test</li>
<li>Web server = Apache http server INFRAVICO05</li>
</ul>

在这个文件中,正如您所看到的,有一些不同类型的标签,如&#34; li,br,ul,a&#34;。我想读取每个标签的值。 请问如何阅读文件标签的值?

谢谢你们所有人!

0 个答案:

没有答案