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:
foo
bar
baz
XML;
and I run that through simplexml into $xml, then doing unset($xml->test)
and then exporting agai
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 to
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
>
3 matches
Mail list logo