Re: Plz Help
Brought to you by:
bs_php,
nigelswinson
From: Peter R. <php...@pe...> - 2003-05-14 08:55:56
|
On Tuesday 13 May 2003 23:39, Magno Cardona wrote: > I have a xml title/content. > <cdi> > <title> > <content> > <title id="WATERCOOLING"> > <content/> > </title> > </content> > </title> > <cdi> > > Now I want to return the xml of a title that matches the XPATH > //title[@id='WATERCOOLING']. > > My problem usint this class is that I cant get the abs path so I > can use the > <file:///C:\Documents%20and%20Settings\Magno\Desktop\test\Php.XPath >Documenta tion.html#exportAsXml#exportAsXml> exportAsXml > > Well I hope I can receive help > > PD: Remember the title can be 20 level inside so writing manually > the abs. path is absurd. not sure I understand the problem, Magno. You can use match/evaluate to fetch the relevant path(s) and then your export as appropriate, e.g.: $nodes = $xml->evaluate("//title[@id='WATERCOOLING']"); foreach ($nodes as $node) print $xml->exportAsXml($node); |