Hi,
I can add nodes no problem, if I do the following for instance:
$calendarXML->add_node("/calendar[1]/month[1]/day[2]","entry");
$calendarXML->add_content($newNode,"something");
That works fine. It's just using the @attribute='' XPath syntax doesn't seem
to work. The reason I don't use the above is that I don't want my parsing to
be dependant on the order of the months and days in the XML file.
Regards,
Gareth
> -----Original Message-----
> From: te...@ho... [mailto:te...@ho...]
> Sent: 09 July 2001 17:49
> To: us...@li...
> Subject: [phpXML] Re: [phpXML] Problems using element[@attribute='']
> syntax ??
>
>
> i was in such trouble too. i wonderfully read XML but adding nodes couse a
> problem.. i tryed everything.
>
> may be somebody will write simply examples how to add/remove/modify nodes
> and write it back to file
>
>
>
> ----- Original Message -----
> From: <ga...@wh...>
> To: <us...@li...>
> Sent: Monday, July 09, 2001 8:45 AM
> Subject: [phpXML] Problems using element[@attribute=''] syntax ??
>
>
> > Hi,
> >
> > I can't, for the life of me, get the following working:
> >
> > $newNode =
> >
> $calendarXML->add_node("/calendar[1]/month[normalize-space(@number
> )='01']/da
> > y[normalize-space(@number)='02']","entry");
> > $calendarXML->add_content($newNode,"something");
> >
> > I've checked my syntax and it appears to be fine but no matter what I do
> it
> > won't add the node in. Does anybody have any ideas? I was hoping to use
> this
> > method to help me to handle a calendar system quicker.
> >
> > Regards,
> >
> > Gareth
> >
> >
> >
> > --
> > This message has been sent through the <phpXML/> user
> discussion list. To
> unsubscribe, please visit
> https://sslsites.de/mailinglisten/user/us...@li.../
>
>
> --
> This message has been sent through the <phpXML/> user discussion
> list. To unsubscribe, please visit
https://sslsites.de/mailinglisten/user/us...@li.../
--
This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../
|