Thanks a lot to all :)
Using DOM I can do what I need. Anyway I was trying the proposed solutions
with SimpleXML but none of them worked for me :(
I tried splitting $key and $value in the foreach command, but when I dump
the xml (with the asXML function) I still have the nodes that I supposed
It seems there's no way to do this. You can unset certain things in
simpleXML objects, but it's really strange non-standard behaviour. If I
have this for an XML document:
?xml version='1.0'?
document
testfoo/test
testbar/test
testbaz/test
/document
XML;
and I run that through simplexml
Javier Ruiz wrote:
Hi all,
So I want to do...
$xmlDatabase = new SimpleXMLElement($myXML);
foreach ($xmlDatabase as $oneTable)
{
if ($oneTable['name'] == 'two')
{
/// HERE I WANT TO DELETE THE $oneTable NODE
unset($oneTable); // -- and this doesn't work...
}
}
any
On 8/31/06, Adam Zey [EMAIL PROTECTED] wrote:
Javier Ruiz wrote:
Hi all,
So I want to do...
$xmlDatabase = new SimpleXMLElement($myXML);
foreach ($xmlDatabase as $oneTable)
{
if ($oneTable['name'] == 'two')
{
/// HERE I WANT TO DELETE THE $oneTable NODE
4 matches
Mail list logo