phpxpath-users Mailing List for Php.XPath (Page 12)
Brought to you by:
bs_php,
nigelswinson
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(346) |
Nov
(8) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(30) |
Feb
(13) |
Mar
|
Apr
(3) |
May
(70) |
Jun
(26) |
Jul
(48) |
Aug
(22) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
|
2003 |
Jan
(3) |
Feb
(3) |
Mar
(11) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2004 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(12) |
Aug
(8) |
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2006 |
Jan
(3) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Nigel S. <nig...@us...> - 2002-01-18 18:40:54
|
> A question about latest CVS : > <snip> > > If I suppress foo2 i'll end with > > <top> > > > <item name="foo3" pricetag="expensive"> > <item name="foo4" pricetag="expensive"> > </top> > > An so on......... > Is there a way to avoid this growing "hole" and rebuild the list without > space ? Not yet no. A know issue, planned to be fixed for the future. If your php is good then you should be able to hardwire Php.XPath to bin whitespace but the long distance plan is to support: - Pretty print - bin all whitespace - preserve as entered. Nigel =========================== For the most recent version of Php.XPath, V2.x, and an archive of this list visit: http://www.sourceforge.net/projects/phpxpath |
From: Luc Saint-E. <lu...@sa...> - 2002-01-18 16:23:30
|
Hello all, What is the more clever way to prevent concurrent access to the same XML file ?? Some kind of locking in the RDBMS sense Thanks in advance Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-18 16:00:59
|
Hello, What is the most clever way to have an attribute auto incremented ? <item id="1"> <itemvalue>foo</itemvalue> </item> <item id="2"> <itemvalue>foo</itemvalue> </item> and so on to have the "id" attribute auto incremented ? Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-18 08:00:24
|
Hello, A question about latest CVS : if I have <top> <item name="foo" pricetag="expensive"> <item name="foo2" pricetag="expensive"> <item name="foo3" pricetag="expensive"> </top> If I do a removechild() on the first element I'll end with : <top> <item name="foo2" pricetag="expensive"> <item name="foo3" pricetag="expensive"> </top> If I add a new item I'll end with <top> <item name="foo2" pricetag="expensive"> <item name="foo3" pricetag="expensive"> <item name="foo4" pricetag="expensive"> </top> If I suppress foo2 i'll end with <top> <item name="foo3" pricetag="expensive"> <item name="foo4" pricetag="expensive"> </top> An so on......... Is there a way to avoid this growing "hole" and rebuild the list without space ? Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-18 07:57:38
|
Hello, With latest CVS is there a way (a setting switch) to get <tag><![CDATA[ content ]]></tag> instead of <tag>content </tag> When doing : $xPath->replaceData($path,$content); The reason is that I'm French and not only we eat frogs but we use a lot of extended characters Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-18 00:05:29
|
Nigel, I tried latest CVS.. it works Luc At 23:50 17/01/02 +0000, you wrote: > > At 17:33 17/01/02 +0100, you wrote: > > >I am also fighting with the develop version the whole day now. > > > > > >getData goes to wholeText() goes to substringData() goes to _setContent() > > > > The fun part is that the deprecated get_content() works... > >Simple bug, just found it. In getData() we had: > > $this->wholeText($absoluteXPath); > >instead of: > > return $this->wholeText($absoluteXPath); > >Oops :o) > >You'll find the fix in CVS. > >Nigel |
From: Nigel S. <nig...@us...> - 2002-01-18 00:02:51
|
(I know this thread is kinda old, but it's been in my inbox all month...) > can't say I've been inundated with solutions to my previous posting :-(, but > it's actually easy to fix w/o recompiling PHP as Dan suggests. Just escape > the underscores in eregs, i.e. on lines 1990 and 2778. That's cos you ask hard questions :o) > Having fixed that, I now have a different problem. > > I have an xml file with large numbers of child (+ grandchild ...) nodes which > may or may not be present. My old phpxml script did an evaluate for the top > level and then get_Contents for any children it needed; if a child didn't > exist, phpxml simply set the variable to null. phpxpath, however, seems to > throw an error and refuse to continue if you try and getData or getDataParts > for a child or attribute that doesn't exist. If I have to do a match/evaluate > for each of these nodes before getData, not only is that a lot of extra work > but I'll probably have to rewrite the logic. > > Can phpxpath be changed to be like phpxml and simply set the variable to null > if getData doesn't find the node? A good point. Sounds annoying. :o( I think the plan is to support different levels of error reporting, so when you build the class, you set an option to say what kind of errors you want. So what you'd do then is say that you don't want errors if the node doesn't exist and you'd be happy, and if you want it to complain, you can leave the errors on. So yeah, we are aiming for this too :o) Nigel =========================== For the most recent version of Php.XPath, and an archive of this list visit: http://www.sourceforge.net/projects/phpxpath |
From: Nigel S. <nig...@us...> - 2002-01-17 23:58:43
|
> I am also fighting with the develop version the whole day now. > > getData goes to wholeText() goes to substringData() goes to _setContent() > > Still confused? Something with $replace=TRUE does fix it ... I did some > changes (too long to explaine), just try this file (but backup your old > one!). > > Did ever someone try to do getData() of > <node>0</node> > ????? It does not work :( and I can't solve it ... I just tried this with the latest from CVS and it worked, so get the latest version, and let us know if there's still a problem :o) The attached two files give the result: ========================================= List of messages.Array ( [0] => /liste[1]/message[1] ) ---------------------------------------------------------------------------- ----/liste[1]/message[1]012------------------------------------------------- -------------------------------<liste> <message> <is_read>0</is_read> <texte>1</texte> <expediteur>2</expediteur> </message> </liste> ========================================= > I should go home maybe and watch TV ... Yeah "Indiana Jones and the Last Crusade" was on TV tonight, so bang went my plans for spending two hours on the test harness :oD Nigel |
From: Nigel S. <nig...@us...> - 2002-01-17 23:51:01
|
> At 17:33 17/01/02 +0100, you wrote: > >I am also fighting with the develop version the whole day now. > > > >getData goes to wholeText() goes to substringData() goes to _setContent() > > The fun part is that the deprecated get_content() works... Simple bug, just found it. In getData() we had: $this->wholeText($absoluteXPath); instead of: return $this->wholeText($absoluteXPath); Oops :o) You'll find the fix in CVS. Nigel |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 17:13:26
|
At 17:33 17/01/02 +0100, you wrote: >I am also fighting with the develop version the whole day now. > >getData goes to wholeText() goes to substringData() goes to _setContent() The fun part is that the deprecated get_content() works... Luc |
From: J. C. <jan...@im...> - 2002-01-17 16:40:02
|
I am also fighting with the develop version the whole day now. getData goes to wholeText() goes to substringData() goes to _setContent() Still confused? Something with $replace=TRUE does fix it ... I did some changes (too long to explaine), just try this file (but backup your old one!). Did ever someone try to do getData() of <node>0</node> ????? It does not work :( and I can't solve it ... I should go home maybe and watch TV ... > -----Ursprüngliche Nachricht----- > Von: php...@li... > [mailto:php...@li...]Im Auftrag von Luc > Saint-Elie > Gesendet: Donnerstag, 17. Januar 2002 17:09 > An: php...@li... > Betreff: A little bit confused > > > Hello (again..)) > > I've been away from xpath.class.php for some time and I'm trying without > succes very simple things with the last dev version > > I use > /Xpath-develop/XPath.class.php (from the cvs) > > > here is my xml file : > ------------------------------------------------------------------ > -------------- > <?xml version="1.0" encoding="iso-8859-1"?> > <liste> > <message> > <is_read>no</is_read> > <texte>qfdmqkjsdmlfkqkdf</texte> > <expediteur>userone</expediteur> > <destinataire>usertwo</destinataire> > <date>1011277311</date> > </message> > <message> > <is_read>no</is_read> > <texte>bon salut ma poule</texte> > <expediteur>usertwo</expediteur> > <destinataire>userone</destinataire> > <date>1011278602</date> > </message> > <message> > <is_read>no</is_read> > <texte>kgluylutglkèutky(kdyrkglu-iuykuyd(uè</texte> > <expediteur>userone</expediteur> > <destinataire>usertwo</destinataire> > <date>1011279657</date> > </message> > </liste> > ------------------------------------------------------------------ > ------------------ > > here is a dam simple bit of code : > > ------------------------------------------------------------------ > --------------------- > require_once 'lib/XPath.class.php'; > $xPath = new XPath(); > $xPath->importFromFile('xml_files/messages.xml'); > $msglist = $xPath->evaluate('/liste/message'); > print_r($msglist); > echo '<br>'; > foreach ( $msglist as $msg ) { > echo $msg.'<br>'; > $is_read = $xPath->getData($msg.'/is_read[1]'); > echo $is_read.'<br>'; > $texte = $xPath->getData($msg.'/texte[1]'); > echo $texte.'<br>'; > $expediteur = $xPath->getData($msg.'/expediteur[1]'); > echo $expediteur.'<br>'; > } > echo $xPath->exportAsHtml(); > ------------------------------------------------------------------ > ----------------------- > > Dump of the evaluate() is ok : > > $msglist Array > ( > [0] => /liste[1]/message[1] > [1] => /liste[1]/message[2] > [2] => /liste[1]/message[3] > ) > > Dump of exportAsHtml() is OK > > But all getData() variables are empty... > > Any direction ? > > Luc > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 16:13:40
|
Hello (again..)) I've been away from xpath.class.php for some time and I'm trying without=20 succes very simple things with the last dev version I use /Xpath-develop/XPath.class.php (from the cvs) here is my xml file : ----------------------------------------------------------------------------= ---- <?xml version=3D"1.0" encoding=3D"iso-8859-1"?> <liste> <message> <is_read>no</is_read> <texte>qfdmqkjsdmlfkqkdf</texte> <expediteur>userone</expediteur> <destinataire>usertwo</destinataire> <date>1011277311</date> </message> <message> <is_read>no</is_read> <texte>bon salut ma poule</texte> <expediteur>usertwo</expediteur> <destinataire>userone</destinataire> <date>1011278602</date> </message> <message> <is_read>no</is_read> <texte>kgluylutglk=E8utky(kdyrkglu-iuykuyd(u=E8</texte> <expediteur>userone</expediteur> <destinataire>usertwo</destinataire> <date>1011279657</date> </message> </liste> ----------------------------------------------------------------------------= -------- here is a dam simple bit of code : ----------------------------------------------------------------------------= ----------- require_once 'lib/XPath.class.php'; $xPath =3D new XPath(); $xPath->importFromFile('xml_files/messages.xml'); $msglist =3D $xPath->evaluate('/liste/message'); print_r($msglist); echo '<br>'; foreach ( $msglist as $msg ) { echo $msg.'<br>'; $is_read =3D $xPath->getData($msg.'/is_read[1]'); echo $is_read.'<br>'; $texte =3D $xPath->getData($msg.'/texte[1]'); echo $texte.'<br>'; $expediteur =3D $xPath->getData($msg.'/expediteur[1]'); echo $expediteur.'<br>'; } echo $xPath->exportAsHtml(); ----------------------------------------------------------------------------= ------------- Dump of the evaluate() is ok : $msglist Array ( [0] =3D> /liste[1]/message[1] [1] =3D> /liste[1]/message[2] [2] =3D> /liste[1]/message[3] ) Dump of exportAsHtml() is OK But all getData() variables are empty... Any direction ? Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 14:24:48
|
Hello, Forget my previous message it was apparently a problem of xpath.class.php version, I put the last dev version and it works.. Luc At 14:16 17/01/02 +0100, Luc Saint-Elie wrote: >Hello, > >Still in my "lets's learn toproduce xml files process", my problem is >solved (thanks Jan) with attributes but now I fail when I want to ad nodes. > >The goal now is to ad a new message in the messages.xml file. >a message is of the form : |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 13:26:03
|
Hello, Still in my "lets's learn toproduce xml files process", my problem is solved (thanks Jan) with attributes but now I fail when I want to ad nodes. The goal now is to ad a new message in the messages.xml file. a message is of the form : <liste> <message> <is_read>no</is_read> <texte>text of the message</texte> <expediteur>username_of_the_sender</expediteur> <destinataire>usernameof the destination</destinataire> <date>1011272580</date> </message> </liste> With the following bit of code the entry is done, but a lot of errors are sent like : *************** XPath error in XPath.class.php:4659 The /liste[1]/message[4]/is_read[1] does not have a text node at position 0 XPath error in XPath.class.php:4659 The /liste[1]/message[4]/texte[1] does not have a text node at position 0 XPath error in XPath.class.php:4659 The /liste[1]/message[4]/expediteur[1] does not have a text node at position 0 XPath error in XPath.class.php:4659 The /liste[1]/message[4]/destinataire[1] does not have a text node at position 0 XPath error in XPath.class.php:4659 The /liste[1]/message[4]/date[1] does not have a text node at position 0 **************** here is my code case 'newmsgs' :$xPath->reset(); $xPath->importFromFile('xml_files/messages.xml'); $newchild=$xPath->appendChild('/liste[1]', 'message'); $newchild1=$xPath->appendChild($newchild, 'is_read'); $xPath->insertData($newchild1, 'no'); $newchild2=$xPath->appendChild($newchild, 'texte'); $xPath->insertData($newchild2, $texte); $newchild3=$xPath->appendChild($newchild, 'expediteur'); $xPath->insertData($newchild3, $expediteur); $newchild4=$xPath->appendChild($newchild, 'destinataire'); $xPath->insertData($newchild4, $destinataire); $newchild5=$xPath->appendChild($newchild, 'date'); $xPath->insertData($newchild5, time()); $xPath->exportToFile('xml_files/messages.xml','','<?xml version="1.0" encoding="iso-8859-1"'.'?'.'>'); Thanks in advance (and tons of excuses for my dummy questions) Luc |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 09:49:07
|
Thanks Jan, Its exactly where my error was.. thanks a lot.... At 10:14 17/01/02 +0100, you wrote: >Instead of: > > > $xPath->appendChild('/connectes[1]', 'user'); > >You need to get the path to the new Child: > > $newchild=$xPath->appendChild('/connectes[1]', 'user'); > >Then you can work with it: > > $attributes['name'] = $user_name; > $attributes['intime'] = time(); > $xPath->setAttributes($newchild, $attributes); > >That should do it, I guess > >Jan |
From: J. C. <jan...@im...> - 2002-01-17 09:20:22
|
Instead of: > $xPath->appendChild('/connectes[1]', 'user'); You need to get the path to the new Child: $newchild=$xPath->appendChild('/connectes[1]', 'user'); Then you can work with it: $attributes['name'] = $user_name; $attributes['intime'] = time(); $xPath->setAttributes($newchild, $attributes); That should do it, I guess Jan > > $xPath->exportToFile('xml_files/connectes.xml','','<?xml > version="1.0" encoding="iso-8859-1"'.'?'.'>'); > $is_connected = 'oui'; > $session_register("is_connected"); > > At the firdst invocation every thing goes fine > > But if I open another browser (to simulate twoi user I use > netscape for one > and MIE for the other) the seond user is added to my connectd.xml > file but > the first one is emptied > > here is the file > > Step one : no one is connected > ======================== > <?xml version="1.0" encoding="iso-8859-1"?> > <connectes/> > > Step two first user connected > ======================== > <?xml version="1.0" encoding="iso-8859-1"?> > <connectes> > <user name="user1" intime="1011253765"/> > </connectes> > > Step three a second user is connected > =============================== > <?xml version="1.0" encoding="iso-8859-1"?> > <connectes> > <user name="user2" intime="1011253789"/> > <user/> > </connectes> > > As you can see the second user is added to the file.. but the > first is emptied. > > Where did I screw up ??? > > Any idea ? > > Luc > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users > |
From: Luc Saint-E. <lu...@sa...> - 2002-01-17 08:01:41
|
Hello all, To learn how to produce (and no more how to read) XML files from xpath.class.php, I'm writing some kind of little instant messenger system. My first goal is too have each new connected user added in a connectes.xml file the file is very simple <connectes> <user name="theuserloginname" intime="timeofarrival"> </connectes> Login name is known and timeofarrival is a simple time() Here is an abstract of my code (part of a switch) -------------------------- default : // display connected user listing $xPath->reset(); $connecte = array(); $xPath->importFromFile('xml_files/connectes.xml'); $aResult = $xPath->evaluate('/connectes/user'); foreach ( $aResult as $user ) { $t = $xPath->getAttributes($user); array_push ($connecte, array('name' =>$t['name'])); } // Add curent user to this list $xPath->appendChild('/connectes[1]', 'user'); $attributes['name'] = $user_name; $attributes['intime'] = time(); $xPath->setAttributes('/connectes[1]/user[1]', $attributes); $xPath->exportToFile('xml_files/connectes.xml','','<?xml version="1.0" encoding="iso-8859-1"'.'?'.'>'); $is_connected = 'oui'; $session_register("is_connected"); At the firdst invocation every thing goes fine But if I open another browser (to simulate twoi user I use netscape for one and MIE for the other) the seond user is added to my connectd.xml file but the first one is emptied here is the file Step one : no one is connected ======================== <?xml version="1.0" encoding="iso-8859-1"?> <connectes/> Step two first user connected ======================== <?xml version="1.0" encoding="iso-8859-1"?> <connectes> <user name="user1" intime="1011253765"/> </connectes> Step three a second user is connected =============================== <?xml version="1.0" encoding="iso-8859-1"?> <connectes> <user name="user2" intime="1011253789"/> <user/> </connectes> As you can see the second user is added to the file.. but the first is emptied. Where did I screw up ??? Any idea ? Luc |
From: Nigel S. <nig...@us...> - 2002-01-17 00:39:12
|
> I think this problem is already known - but I could not find anything in the > latest messages: > When I try put the value "0" into a node it just gives me: > > <selectvalue/>0 > > instead of: > > <selectvalue>0</selectvalue> Fixed in CVS revision 1.51 (mid december). If this bug is a "showstopper" for you, then you might want to get the latest version from CVS. Thanks for the very complete bug report! :o) > By the way: > > 565 $xmlString = $this->exportAsXml($absoluteXPath); //Nothing modified > here > 566 $newline="\n"; //New > 567 if (!fwrite($hFile, $xmlHeader.$newline.$xmlString)) { //New > > makes the head of the written xml look nicer (new Line after <? ... ?> > part). That whole section of code needs review, as there seem to be about three different models that we should be considering when dealing with whitespace. Bin all, pretty print and preserve. I'm still trying to focus on "bugs" though, and a decent test harness, so this "review" might not be for a while yet.... Cheers, Nigel |
From: Luc Saint-E. <lu...@sa...> - 2002-01-16 15:23:29
|
Nigel, In fact I had to ad : $xPath->setAttribute('/am/i/stupid[1]', 'yes'); Luc At 14:18 16/01/02 +0000, Nigel Swinson wrote: > > I've been using phpxml the xpath.class.php but only to read wml file. > > > > Now I need to use it to add stuff in a xml file and I fail > > > > The file is very basic: > > <connectes> > > <user name="fooname" intime="footime"/> > > <user name="fooname1" intime="footime2"/> > > etc... > > </connectes> > > > > Doing : > > > > > > require_once 'lib/XPath.class.php'; > > $xPath = new XPath(); > > $attributes = array(); > > $xPath->reset(); > > $xPath->importFromFile('xml_files/connectes.xml'); > > $xPath->appendChild('/connectes[1]', 'user'); > > $attributes['name'] = $user_name; // => $user_name is a session variable > > $attributes['intime'] = time(); > > $xPath->setAttributes('/connectes[1]/user[1]', $attributes); > > > > Nothing happen, I get no error but the xml file is left untouched > >Are you doing a ->exportToFile($filename)? If you don't export, then >changes will not persist to disk. > >Nigel > > > >_______________________________________________ >Phpxpath-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phpxpath-users |
From: Nigel S. <nig...@us...> - 2002-01-16 14:19:36
|
> I've been using phpxml the xpath.class.php but only to read wml file. > > Now I need to use it to add stuff in a xml file and I fail > > The file is very basic: > <connectes> > <user name="fooname" intime="footime"/> > <user name="fooname1" intime="footime2"/> > etc... > </connectes> > > Doing : > > > require_once 'lib/XPath.class.php'; > $xPath = new XPath(); > $attributes = array(); > $xPath->reset(); > $xPath->importFromFile('xml_files/connectes.xml'); > $xPath->appendChild('/connectes[1]', 'user'); > $attributes['name'] = $user_name; // => $user_name is a session variable > $attributes['intime'] = time(); > $xPath->setAttributes('/connectes[1]/user[1]', $attributes); > > Nothing happen, I get no error but the xml file is left untouched Are you doing a ->exportToFile($filename)? If you don't export, then changes will not persist to disk. Nigel |
From: Luc Saint-E. <lu...@sa...> - 2002-01-16 14:12:33
|
Hello, I've been using phpxml the xpath.class.php but only to read wml file. Now I need to use it to add stuff in a xml file and I fail The file is very basic: <connectes> <user name="fooname" intime="footime"/> <user name="fooname1" intime="footime2"/> etc... </connectes> Doing : require_once 'lib/XPath.class.php'; $xPath = new XPath(); $attributes = array(); $xPath->reset(); $xPath->importFromFile('xml_files/connectes.xml'); $xPath->appendChild('/connectes[1]', 'user'); $attributes['name'] = $user_name; // => $user_name is a session variable $attributes['intime'] = time(); $xPath->setAttributes('/connectes[1]/user[1]', $attributes); Nothing happen, I get no error but the xml file is left untouched Luc |
From: J. C. <jan...@im...> - 2002-01-16 12:32:41
|
Hi !!! I think this problem is already known - but I could not find anything in the latest messages: When I try put the value "0" into a node it just gives me: <selectvalue/>0 instead of: <selectvalue>0</selectvalue> ------------ The test.php file: ------------------------------ <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <? require_once("xpath.class.php"); $xmlfile="file.xml"; $xpath = new XPATH($xmlfile); if (isset($HTTP_POST_VARS["SUBMIT"])){ $xpath->replaceData("/DogTag[1]/selectvalue[1]",$HTTP_POST_VARS["select"]); $xpath->exportToFile($xmlfile,'','<?xml version="1.0" encoding="iso-8859-1"'.'?'.'>'); } ?> <body bgcolor="#FFFFFF"> <form method="post" action=""> <select name="select"> <option value="0" <? if ($xpath->getData("/DogTag[1]/selectvalue[1]")==0){ echo "selected";}?>>0</option> <option value="1" <? if ($xpath->getData("/DogTag[1]/selectvalue[1]")==1){ echo "selected";}?>>1</option> </select> <input type="submit" name="SUBMIT" value="Submit"> </form> </body> </html> ------------ The file.xml file: ------------------------------ <?xml version="1.0" encoding="iso-8859-1"?> <DogTag> <selectvalue>1</selectvalue> </DogTag> ---------------------------------------------------------------- By the way: 565 $xmlString = $this->exportAsXml($absoluteXPath); //Nothing modified here 566 $newline="\n"; //New 567 if (!fwrite($hFile, $xmlHeader.$newline.$xmlString)) { //New makes the head of the written xml look nicer (new Line after <? ... ?> part). Ok, till next time ... Jan |
From: Nigel S. <nig...@us...> - 2002-01-03 13:07:00
|
> But I still get this bunch of other deprecation warnings ".. > call_user_method() .." and before searching though the archive (well, at > least I searched for a search-function and did not find it) I just post my > problem again: Ah, yeah, that'll be fixed in the next version. It's actually already fixed, so if you are happy to risk it then if you grab the latest version from CVS then this error should also go away :o) Nigel =========================== For the most recent version of Php.XPath, and an archive of this list visit: http://www.sourceforge.net/projects/phpxpath |
From: J. C. <jan...@im...> - 2002-01-03 09:20:24
|
Hm, I did enable it and "allow_call_time_pass_reference" is set to "on" when I check it with phpinfo() and now the warnings about the ".. set allow_call_time_pass_reference to true .." warnings disappeared - great, thank's! But I still get this bunch of other deprecation warnings ".. call_user_method() .." and before searching though the archive (well, at least I searched for a search-function and did not find it) I just post my problem again: PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 PHP Warning: The call_user_method() function is deprecated, use the call_user_func variety with the array(&$obj, "method") syntax instead in E:\imeso\web\Administration\data\xpath.class.php on line 2216 Any advice? Thank's a lot!!! Cheers Jan > -----Ursprüngliche Nachricht----- > Von: php...@li... > [mailto:php...@li...]Im Auftrag von Nigel > Swinson > Gesendet: Donnerstag, 3. Januar 2002 02:08 > An: php...@li... > Betreff: Re: Problems with PHP Version 4.1.0 ??? > > > > I installed the new Version 4.1.0 of PHP (well the newest is 4.1.1 of > > course) and now I am getting some warnings regarding the XPath Class (no > > warnings with Version 4.0.6!): > > ______________ > > > > If you would like to enable call-time pass-by-reference, you can set > > allow_call_time_pass_reference to true in your INI file. However, future > > versions may not support this any longer. in > > <snip> > > > E:\imeso\web\Administration\data\xpath.class.php on line 2216 > > ________________ > > > > My php file uses > > > > include ("xpath.class.php") and > > $xpath = new XPATH("xmlfile.xml") and > > > > calls "getData()" two times, which works fine. > > > > When using "@include()" it does not give warnings about the "call-time > > pass-by-reference" but still the "call_user_method() > function"-warning six > > times. > > > > I guess this is a general problem - or am I wrong? > > https://sourceforge.net/docman/display_doc.php?docid=8196&group_id=36731 > > Should just be a case of altering the > allow_call_time_pass_reference setting > on your installation (php.ini or .htaccess). This issue has come > up several > times already I think. If that fails, then there was other discussion > recently on the topic that might give you some insight: > > http://www.geocrawler.com/archives/3/16154/2001/12/0/ > > Cheers, > > Nigel > > =========================== > For the most recent version of Php.XPath, and an archive of this > list visit: > http://www.sourceforge.net/projects/phpxpath > > > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users > |
From: Nigel S. <nig...@us...> - 2002-01-03 01:10:30
|
> I installed the new Version 4.1.0 of PHP (well the newest is 4.1.1 of > course) and now I am getting some warnings regarding the XPath Class (no > warnings with Version 4.0.6!): > ______________ > > If you would like to enable call-time pass-by-reference, you can set > allow_call_time_pass_reference to true in your INI file. However, future > versions may not support this any longer. in <snip> > E:\imeso\web\Administration\data\xpath.class.php on line 2216 > ________________ > > My php file uses > > include ("xpath.class.php") and > $xpath = new XPATH("xmlfile.xml") and > > calls "getData()" two times, which works fine. > > When using "@include()" it does not give warnings about the "call-time > pass-by-reference" but still the "call_user_method() function"-warning six > times. > > I guess this is a general problem - or am I wrong? https://sourceforge.net/docman/display_doc.php?docid=8196&group_id=36731 Should just be a case of altering the allow_call_time_pass_reference setting on your installation (php.ini or .htaccess). This issue has come up several times already I think. If that fails, then there was other discussion recently on the topic that might give you some insight: http://www.geocrawler.com/archives/3/16154/2001/12/0/ Cheers, Nigel =========================== For the most recent version of Php.XPath, and an archive of this list visit: http://www.sourceforge.net/projects/phpxpath |