this is my php code:
$dir=getcwd();
$xmlDoc=$dir."/xml1.xml";
$xdoc = new DOMDocument;
$xdoc->validateOnPars e = true;
$xdoc->Load($xmlDoc );
$book = $xdoc->documentElemen t;
$xp = new DomXPath($xdoc) ;
$res = $xp->query("//*[@id = '".$id."']");
//$chapter = $xp->getElementsByT agName('club')->item(0);
$oldchapter = $book->removeChild($r es->item(0));
echo $test = $xdoc->save($xmlDoc );
i want to use query function also...
plz help me...
$dir=getcwd();
$xmlDoc=$dir."/xml1.xml";
$xdoc = new DOMDocument;
$xdoc->validateOnPars e = true;
$xdoc->Load($xmlDoc );
$book = $xdoc->documentElemen t;
$xp = new DomXPath($xdoc) ;
$res = $xp->query("//*[@id = '".$id."']");
//$chapter = $xp->getElementsByT agName('club')->item(0);
$oldchapter = $book->removeChild($r es->item(0));
echo $test = $xdoc->save($xmlDoc );
i want to use query function also...
plz help me...
Comment