phpxpath-users Mailing List for Php.XPath (Page 24)
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: <bs...@us...> - 2001-10-08 13:04:27
|
Hi Luc, my answer will be surprising: "Everything is OK". The problem is in the code of M.Mehl you use to do the query. It's missing quotes !: Sample: //person/*[contains(., 'Jos')]/.. ( Not //person/*[contains(., Jos)]/.. ) Correct line 134 (+/-) $government = $xml->evaluate( "//person/*[contains(., $term)]/.."); to $government = $xml->evaluate( "//person/*[contains(., '$term')]/.."); Otherwise XPath will asume it's a function call instead of a string and will try to evaluate it. -- Sam Blum <bs...@us...> =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <nig...@us...> - 2001-10-08 13:03:37
|
> Sorry but to help you you must: > > 1) Use the newest version unter https://sourceforge.net/projects/phpxmldb/ > 2) To analyse the problem pass *the* (=1) query you are trying to evaluate and > the XML sample (as simple as possible) that delivers the wrong set of paths. > 3) Don't lose the response we send you ;-) Remember too that there is an archive of this mailling list. Available from the link below. You'll find your "reply" there. The response that you are looking for was sent by me and is dated 27th August. My advice was identical to that of that above too, except minus point 3 obiviously... Nigel =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-08 13:02:02
|
Sam, You're right, This bug correction works perfectly well with 1N7pre Luc At 13:17 30/09/01 +0000, bs...@us... wrote: >Hi Luc, > >my answer will be surprising: "Everything is OK". >The problem is in the code of M.Mehl you use to do the query. >It's missing quotes !: >Sample: > //person/*[contains(., 'Jos')]/.. ( Not //person/*[contains(., > Jos)]/.. ) > >Correct line 134 (+/-) > $government = $xml->evaluate( "//person/*[contains(., $term)]/.."); >to > $government = $xml->evaluate( "//person/*[contains(., > '$term')]/.."); > >Otherwise XPath will asume it's a function call instead of a string >and will try to evaluate it. > >-- >Sam Blum <bs...@us...> -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <jb...@hs...> - 2001-10-08 13:00:28
|
Is it possible...? I am looking for the easiest way to preform simple xml xslt html transformations thanks in advance -Jon http://sig.sourceforge.net http://www.gamesig.com http://digitalpimpingrounds.net -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <se...@ww...> - 2001-10-08 12:58:34
|
Hi, I think it's not possible. The only way to get the attributes is to use get_attributes function. If you want to use XPath expressions so you must use XSLT to extract the data and generate HTML. Serge. ----- Original Message ----- From: <ti...@di...> To: <us...@li...> Sent: Tuesday, September 18, 2001 4:55 PM Subject: [phpXML] How to get at attributes. > Hello everybody. > > First of all I want to thank everybody who had a hand in writing this very > nice object. > I am wondering if there is a shortcut way to handle attributes. > > Right now I am calling the attributes function and getting an array but I > want to use an expression like "//somepath/something/@someattribute" -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <nig...@us...> - 2001-10-05 10:47:18
|
> just patched phpxml 1.N.5: > > // OLD -------------------------------------------------- > function setAttributes($absoluteXPath, $attribute) { <snip> > > Tell me where the $path variableis set and why the parameter > $attribute > is called $attributes in the function... > > > // NEW -------------------------------------------------- > function setAttributes($absoluteXPath, $attributes) { <snip> Thanks. Spotted some other instances of this too. Oops (again). And there was me thinking it was a good idea to change from $path to $absoluteXPath. :o) =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:47:12
|
En réponse à flo...@co...: > Look at http://www.kzar.net/testxml.php for a working > exwemple. You can > insert datas in a db instead of displaying them. > The script can be found at > http://www.kzar.net/source.php?p=/testxml.php <french> Super ton bazar multifichiers... j'étais en train de bricoler un truc du genre..mais en moins bien. Chapeau ! </french> Great job ! Your results are imapcted by the infamous array-entities() problem... Try to emplty this array and you'll see the ' disapear (and probably see also other problems emerge.. ;-) ) By the way the latest release of xml.php is on sourceforge (I don't have the url handy if you don't find it I'll post it to you this evening) Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <nig...@us...> - 2001-10-05 10:47:10
|
> > Litl question: what is the array $entities for ? > > The content is not converted as it should be, nothing happens - or I just > > didnt get the point. > > > > Why I need this: a must use breaks ( <br> ), &, and other special > > characters... I would call htmlspecialchars() before passing anything to PhpXml. There are some seriously bad bugs in PhpXml when you try to store marked up text in phpxml using set_content() or add_content(). Please refer to the release notes of PhpXml 1.N.4 available at http://www.sourceforge.net/projects/phpxmldb for more info. Version 1.N.4 does not use the $entities array at all, because there seems to be no logical reason for it to be there. Nigel -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:45:37
|
En réponse à pie...@wa...: Hello Pierre-Henri I'm learning XML/Xptah so I'm interested by your code. Why did you choose NOT to use this kind of code : Here is the XML file: --------------------- <NewsML> <Catalog Href="http://www.afp.com/dtd/AFPCatalog.xml"/> <NewsEnvelope> <DateAndTime>20010608T133354Z</DateAndTime> </NewsEnvelope> </NewsML> Here is the code: ----------------- $xml = new XPath($filepath); $t = array(); $listofNews = $xml->evaluate("NewsML"); foreach ($listofNews as $news) { $t = $xml->getAttributes ("NewsML/Catalog"); echo $t['Href']; echo $xml->getData("NewsML[1]/NewsEnvelope[1]/DateAndTime[1]"); } Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <pie...@wa...> - 2001-10-05 10:45:25
|
Hello, I need some help with the substringData function, it doesn't return anything. Am I doing something wrong? Here is the code: ----------------- $xml = new XPath($filepath); $newsidentifier_eval = $xml->evaluate("NewsML/NewsEnvelope/DateAndTime"); echo $newsidentifier_eval[0] . " -- line1\n"; echo $xml->nodeName($newsidentifier_eval[0]) . " -- line2\n"; echo $xml->substringData($newsidentifier_eval[0]) . " -- line3\n"; Result: ------- /NewsML[1]/NewsEnvelope[1]/DateAndTime[1] -- line1 DateAndTime -- line2 -- line3 Thanks in advance. -- Pierre-Henri Delaval pie...@be... Studio Wanadoo Lozenberg 22 - 1932 Zaventem Tel: +32 (0)2 717 18 07 -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <bo...@fi...> - 2001-10-05 10:43:53
|
Hi, Im trying to understand how to use phpxml library for parsing xml documets. The problem is, I have an xml document that is stored in database. It is not stored in a file. Im able to retrive it from db into a string. However I dont know how to parse that string using phpxml. You have a load_file function that reads a file and parses the XML data. In my case I need the same thing to be done, the only problem is I dont have a file with xml I have a string. So how do I parse a string using your phpxml library? Note: the xml tags in that string are unknown and can be arbitrary. I need to parse it into a structure. Regards, Boulat -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ti...@di...> - 2001-10-05 10:42:21
|
At 08:10 AM 9/18/2001 +0000, you wrote: >Hi, > >I think it's not possible. The only way to get the attributes is to use >get_attributes function. > >If you want to use XPath expressions so you must use XSLT to extract the >data and generate HTML. Ok thanks. I keep going back and forth but I always seem to need something that XSLT does not provide. So I usually end up back in php. ---------------------------------------------- Tim Uckun Mobile Intelligence Unit. ---------------------------------------------- "There are some who call me TIM?" ---------------------------------------------- -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:40:48
|
At 10:19 15/08/01 +0000, ber...@or... wrote: >Hope someone understands me.. Hello spaceship.. I do receive you 5/5.... >Litl question: what is the array $entities for ? This is the best kept secret since the end of the cold war... please don't ask... you're know in danger.... >The content is not converted as it should be, nothing happens - or I just >didnt get the point. > >Why I need this: a must use breaks ( <br> ), &, and other special >characters... I ended in emptying this array, every things is ok but until know I read, parse files, I don't produce/save them..so perhaps its not the right solution. Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ti...@di...> - 2001-10-05 10:40:45
|
>Michael is not the maintainer anymore, he's been silent for the last 2.5 >months. I seem to be looking after if for now at least. I guess that's the power of open source. >I agree most usage is read only, so that will certainly be the path that we >will optimise for. I use the php DOM functions to create XML docs (I am still not fully convinced that it's the best way but..) and I need something to read those document and work on them. Mainly as an alternative to XSLT. :wq Tim Uckun US Investigations Services/Due Diligence http://www.diligence.com/ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <le...@en...> - 2001-10-05 10:40:40
|
I think archive of phpXML mailing list is made automatically. Best regards Dejan -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <bs...@us...> - 2001-10-05 10:39:11
|
Answer to > What do you mean by this correction (or I don't see the difference): > 1997c2000 > < if (ereg('^\w*$', $predicate)) { > --- > > if (ereg('^\w*$', $predicate)) { There the same, except for a space at the end of line. You are looking at CVS diff. CVS default diff also to reconize white spaces as a difference. No panic :o). -- Sam Blum <bs...@us...> =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ti...@di...> - 2001-10-05 10:38:47
|
Hello everybody. First of all I want to thank everybody who had a hand in writing this very nice object. I am wondering if there is a shortcut way to handle attributes. Right now I am calling the attributes function and getting an array but I want to use an expression like "//somepath/something/@someattribute" Is this possible ---------------------------------------------- Tim Uckun Mobile Intelligence Unit. ---------------------------------------------- "There are some who call me TIM?" ---------------------------------------------- -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <gi...@bt...> - 2001-10-05 10:38:23
|
Hi [..cut..] > If the projects don't merge, then phpxml will certainly be using the > evaluate() code from xmltree. The performance increase is extremely > significant. Dietrich could make better estimates than I, but I think you > are talking about something in the region of 70% saving on execution time. > > Is that significant enough for you ;o) Woaah :) That's is the best news i've had all month :) Can't wait to see 1.N.5 and how it's done. Thanks and keep up the good work. Girish -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <nig...@us...> - 2001-10-05 10:36:51
|
> I have defined a schema that has nodes with attributes that contain hyphens. > The xpath processor appears to not like this. Has anyone experienced this? > Has anyone found this and already fixed it? I don't believe anyone has found this to be a bug yet. Are you using version 1.N.4? > Is there an archive of the mailing list? The links you are looking for are: http://www.sourceforge.net/projects/phpxmldb Follow the mail list links to find a geocrawler archive of this list. Nigel -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <lu...@sa...> - 2001-10-05 10:36:48
|
En réponse à o.t...@ab...: > Hi, > > Can anybody tell me how to use the xml.php file. > Do I have to place it on a > certain location, or do I have to include that in every file? Hello, Copy the following in a file <?php echo phpinfo(); ?> Call the file lets say : phpinfo.php and call it from your browser. If you have an include directory it will be reported in the resuting page. Place your xml.php file in this include directory In each php that uses xml.php : include('xml.php'); Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <m.n...@t-...> - 2001-10-05 10:35:15
|
I will be out of the office starting 11.09.2001 and will not return until 02.10.2001. I'm out of office from september 11th until october 2nd. I will respond to your message when I return. In urgent cases contact Mr. Renato Hermann (r.h...@t-...). Ich bin vom 11. September bis und mit 1. Oktober abwesend. Ich werde Ihre Anfrage nach meiner R=FCckkehr beantworten. In dringenden F=E4llen kontakti= eren Sie bitte Herrn Renato Hermann (r.h...@t-...). -- This message has been sent through the <phpXML/> user discussion list. To u= nsubscribe, please visit https://sslsites.de/mailinglisten/user/user@lists.= phpxml.org/ |
From: <lu...@sa...> - 2001-10-05 10:35:03
|
En réponse à ti...@sc...: > Tag Michael Mehl, > > Ich habe leider ein Problem mit PHP und XML, wäre schön wenn Du > vielleicht > eine Idee hättest. Folgendes: Hello, Please guys make the effort to post in English even if its in bad english There not only English speaking people here, there are other ones (I'm one of those) that could follow a discussion in English but not in others languages.. Well let's say I've a proposition : what if every body speak French ? ;-)) Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <nig...@us...> - 2001-10-05 10:33:31
|
The whitespace handling is somewhat "historical" due to the appaling way that we used to represent the internal text and element nodes. Now that we have the <a>1<b>2</b>3</a> bug fixed, we should really get round some time to reproducing the exact same xml document that we read in. That would be a good goal... Nigel =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ro...@sp...> - 2001-10-05 10:33:24
|
Hi I recently entered the phpXML forum and I would like to know which projects are there under development that have as base object the phpXML object. Is anybody working on XSLT? DTD's? Schemas? I also made some very simple changes to some functions inside the phpXML object, so now you can use strings to create the XML object and also get a string representation in order to be able to save it to a DB. If anyone is interested in the code, just ask for it Rodrigo Reyes -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |
From: <ti...@di...> - 2001-10-05 10:31:52
|
At 08:09 PM 9/19/2001 +0000, you wrote: >Boulat, > >Version 1 has a fucntion to load a string : > >$xml->load_string ($mywonderfullstring); > >You can get it from : >http://sourceforge.net/projects/phpxmldb Do you know if the maintainer of this has changed now? Is anybody interested in forking this to be a fast, small read only XML parser and xpath evaluator? :wq Tim Uckun US Investigations Services/Due Diligence http://www.diligence.com/ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |