phpxpath-users Mailing List for Php.XPath (Page 14)
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: Dan A. <big...@us...> - 2001-11-06 17:35:49
|
Remember, appendChild returns the absolute path (aka /root[1]/newchild[1]) so that you don't have to figure it out manually after adding the new child. so you can do $newnode = $xml->appendChild("/root[1]","newchild"); $xml->appendData($newnode,"data); Dan On Tue, 06 Nov 2001 14:26:49 GMT Paul / USH <pa...@tr...> wrote: > On 06 Nov 2001 11:41 GMT you wrote: > > > Hi > > > > I've been trying to figure this out too. The only way can do it is to > > appendChild() then appendData() into that child. > > > > $xml->appendChild("/root[1]", "newchild"); > > $xml->appendData("/root[1]/newchild[1]", "some new data here"); > > Thankyou, you've just solved my initial problem > I was using appendData - when I should have been using appendChild first. > > Paul > www.nostalgiagoggles.com > > > > > > It would be nice to be able to to this in one step. > > > > Any help appreciated. > > > > > > Girish > > > > ----- Original Message ----- > > From: "Paul / USH" <pa...@tr...> > > To: <php...@li...> > > Sent: Tuesday, November 06, 2001 11:19 AM > > Subject: appendChild help? > > > > > > > I'm using Php.XPath Version 2.1 and I'm having some trouble understanding > > what to pass into appendChild as the node. > > > > > > Could someone give me a simple example of appending a child to a node. > > > > > > e.g. > > > > > > file contents are <root></root> > > > $xml = new XPath("$filename"); > > > $xml->appendData("/root[1]", "blah" ); > > > > > > What do I put in instead of "blah" to add a node called blah? > > > > > > Paul > > > www.nostalgiagoggles.com > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users |
From: Paul / U. <pa...@tr...> - 2001-11-06 14:30:58
|
On 06 Nov 2001 11:41 GMT you wrote: > Hi > > I've been trying to figure this out too. The only way can do it is to > appendChild() then appendData() into that child. > > $xml->appendChild("/root[1]", "newchild"); > $xml->appendData("/root[1]/newchild[1]", "some new data here"); Thankyou, you've just solved my initial problem I was using appendData - when I should have been using appendChild first. Paul www.nostalgiagoggles.com > > It would be nice to be able to to this in one step. > > Any help appreciated. > > > Girish > > ----- Original Message ----- > From: "Paul / USH" <pa...@tr...> > To: <php...@li...> > Sent: Tuesday, November 06, 2001 11:19 AM > Subject: appendChild help? > > > > I'm using Php.XPath Version 2.1 and I'm having some trouble understanding > what to pass into appendChild as the node. > > > > Could someone give me a simple example of appending a child to a node. > > > > e.g. > > > > file contents are <root></root> > > $xml = new XPath("$filename"); > > $xml->appendData("/root[1]", "blah" ); > > > > What do I put in instead of "blah" to add a node called blah? > > > > Paul > > www.nostalgiagoggles.com |
From: Nigel S. <nig...@us...> - 2001-11-06 14:03:58
|
> Could someone give me a simple example of appending a child to a node. > > e.g. > > file contents are <root></root> > $xml = new XPath("$filename"); > $xml->appendData("/root[1]", "blah" ); > > What do I put in instead of "blah" to add a node called blah? Erm, that should work. You should get: <root><blah/></root> Don't you? How do you know you don't? Perhaps mail round example xml file and php script? > I've been trying to figure this out too. The only way can do it is to > appendChild() then appendData() into that child. > > $xml->appendChild("/root[1]", "newchild"); > $xml->appendData("/root[1]/newchild[1]", "some new data here"); > > It would be nice to be able to to this in one step. > > Any help appreciated. It's on it's way. Soon you'll be able to do: appendChild("/root[1]","<newchild>some new data here</newchild>"); 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: Girish N. <gi...@bt...> - 2001-11-06 11:44:24
|
Hi I've been trying to figure this out too. The only way can do it is to appendChild() then appendData() into that child. $xml->appendChild("/root[1]", "newchild"); $xml->appendData("/root[1]/newchild[1]", "some new data here"); It would be nice to be able to to this in one step. Any help appreciated. Girish ----- Original Message ----- From: "Paul / USH" <pa...@tr...> To: <php...@li...> Sent: Tuesday, November 06, 2001 11:19 AM Subject: appendChild help? > I'm using Php.XPath Version 2.1 and I'm having some trouble understanding what to pass into appendChild as the node. > > Could someone give me a simple example of appending a child to a node. > > e.g. > > file contents are <root></root> > $xml = new XPath("$filename"); > $xml->appendData("/root[1]", "blah" ); > > What do I put in instead of "blah" to add a node called blah? > > Paul > www.nostalgiagoggles.com > > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users |
From: Paul / U. <pa...@tr...> - 2001-11-06 11:23:25
|
I'm using Php.XPath Version 2.1 and I'm having some trouble understanding what to pass into appendChild as the node. Could someone give me a simple example of appending a child to a node. e.g. file contents are <root></root> $xml = new XPath("$filename"); $xml->appendData("/root[1]", "blah" ); What do I put in instead of "blah" to add a node called blah? Paul www.nostalgiagoggles.com |
From: Nigel S. <nig...@us...> - 2001-10-24 12:45:43
|
> This is good, but the sender is no more visible ,and that is rather strange.. > Perhaps its aquestion of header : > From : the sender > Reply-to: php...@li... Have switched the option off. Posts are no longer "anonymous", you'll just all have to be careful to post replys to the list, not just to the sender... The list script doesn't seem powerful enough to re-write the Reply-to header :o( Cheers all, 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: <php...@li...> - 2001-10-23 15:15:45
|
En réponse à php...@li...: > I have forced the sender header to phpxpath-users so that when you > click reply all replies go to the list. Is this not a good idea? > I can change it if you like :o) > Nigel This is good, but the sender is no more visible ,and that is rather strange.. Perhaps its aquestion of header : From : the sender Reply-to: php...@li... Luc |
From: <php...@li...> - 2001-10-23 15:09:45
|
> By the way list settings are strange, its impossible to have the sender email... > > Looks like if there are no humain being behind all this just machines talking > to machines.... I have forced the sender header to phpxpath-users so that when you click reply all replies go to the list. Is this not a good idea? I can change it if you like :o) Nigel |
From: <php...@li...> - 2001-10-23 08:37:54
|
En réponse à php...@li...: > Sorry I sent that to wrong address. Please forgive me. I think so, this has absolutely nothing to do with xpath... By the way list settings are strange, its impossible to have the sender email... Looks like if there are no humain being behind all this just machines talking to machines.... Luc |
From: <php...@li...> - 2001-10-23 05:57:50
|
Sorry I sent that to wrong address. Please forgive me. ---------------------------------------------- Tim Uckun Mobile Intelligence Unit. ---------------------------------------------- "There are some who call me TIM?" ---------------------------------------------- |
From: <php...@li...> - 2001-10-23 05:43:34
|
When you compared the act of a relatively minor and harmless virus like nimda to the blowing up of the world trade centers it made me sick to my stomach. You demeaned the lives of 6000 innocent Americans who died that day you ought to be ashamed of yourself. Wasn't it bad enough to use the tragedy of that day to advance the agenda of your corporation and profit? Did you really have to go that far? There are a plenty of people in this world who believe that Microsoft employees are morally corrupt and you have just proven their point. ---------------------------------------------- Tim Uckun Mobile Intelligence Unit. ---------------------------------------------- "There are some who call me TIM?" ---------------------------------------------- |
From: <php...@li...> - 2001-10-22 23:23:22
|
solid idea! Give it time, there server is always overloaded... hey Nigel, is there anyway to get the Reply to: to be php...@li... instead of php...@li... dan On Monday 22 October 2001 03:19 pm, you wrote: > http://dev.w3.org/cvsweb/2001/DOM-Test-Suite/tests/level1/core/ > > I really really think that it would be a good idea to use the above files > somehow in our test harness. The XML files are used somehow with an XSLT > to produce a purpose built test harness for your module. Annoyingly I > can't seem to find them as a download .zip or manage to get the cvs to > connect to the w3c server so can't conveniently get them. > > Comments? > > Nigel > > > _______________________________________________ > Phpxpath-develop mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-develop _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <php...@li...> - 2001-10-22 22:02:11
|
I have a few more things to touch up and this will be done, much like appendChild() but there were a few other things I had forgetten about...anyway, as soon as I get my bearing together with the CVS (I have been following the list for at least a month and half now very closely, I will put this in there...carefully of course dan _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <php...@li...> - 2001-10-22 20:45:35
|
We should never ever follow any recommendation of microsoft...only recommendations beginning with www.w3c.org should we follow, and not just my option... dan On Monday 22 October 2001 01:41 pm, you wrote: > sorry about those e-mails to phpxpath-develop...somehow the reply got into > a viscious loop and it took me a while to break out of it. > > Dan > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <php...@li...> - 2001-10-22 20:41:25
|
sorry about those e-mails to phpxpath-develop...somehow the reply got into a viscious loop and it took me a while to break out of it. Dan _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <php...@li...> - 2001-10-22 10:01:15
|
> Hey Nigel, just saw you fixed the & bug, that's > sweet. I wanted to suggest > one other change to the export function that I > forgot to mention... <snip> > I am > attempting to clean up the > export of data when a tag has "mixed" > children...notice how I added the > parameter $useIndent...the point here is if the > node has mixed children, it > turns off the linefeeding and indenting so that > when you read in a file, dump > it, read it in, dump it, etc... you don't end up > with tons of empty lines in > your mixed data....try it out now by putting some > <br/> tags inside of your > text node and you will see what I am talking > about...cruise through this code > to see my idea about adding a "mixed" child > checker...is is pretty basic what > I did and seems to work 100%... I've actually completely re-written the handling of whitespace so that if you import() export() you will get the same whitespace. It also supports <![CDATA[ ]]> and <?handler ?> script blocks. When you call appendChild() it will "guess" the whitespace for you. This should make for a better model, and whitespace shouldn't start "growing" now like it used to. Hopefully this will meet your needs, if not let us know... Nigel =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb |
From: <php...@li...> - 2001-10-22 03:34:22
|
I would like to quickly explain why I chose to implement this function as I did....the appendChild funtion can take a "document-fragment" according to the w3c recommendation. Now, there is a very interesting thing about a document fragement. The way I set it up, you can pass in the following xml string to be inserted... <book id="2"> <title>First Book</title> </book> <book id="4"> <title>Second Book</title> </book> I am going to allow that, but technically that is not a document fragment, that is what is referred to as a node-set...A document fragment is a partial xml document, where there is a single "root" node and children, etc. of that node...However, when the document fragment is inserted into xmltree, ONLY the children of that "root" node are inserted, so the "root" node is really just garbage...Daniel Viellard came up with a convention that I used in my function...he takes what the user types, like above, wraps it inside of <fake> </fake> tags, to create a document fragment...since the "fake" gets tossed anyway, it is okay to just add that to the user's xmlString in order to work with it like a document fragment. So, the one thing I need to go back and add to the appendChild is to check for </> tags, because if they are not there, it should create an empty tag with that name... Dan _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <php...@li...> - 2001-10-22 00:41:25
|
Now that the code is there to merge a new node-set into the tree, we could very easily tackle replaceNode and clone node as well...without having to use to use deleteChild and then appendChild again, which would be painfully slow...instead, perhaps I will modify the appendChild function if time permits to handle a very fast replaceNode function.... Dan ------------------------------------------------------- __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com |
From: <php...@li...> - 2001-10-22 00:40:27
|
One more addition to that last code...append a "@" to the beginning of the implode call when it is a url to suppress php warnings...since the xpath warning will be outputted anyway... Oh, and if you want to do a socket connection...check out the code from the rdf php class...which you can find at http://www.fase4.com/rdf/ I also put a snippet of the code below.... if ( $this->_use_proxy == true ) { // we need a raw socket here to connect to proxy $fp = fsockopen($this->_phost,$this->_pport); if (!$fp) $this->_throw_exception( $this->_remote_file." is not available with proxy" ); else { if ( $this->_use_proxy_auth == true ) fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\n\r\n"); else fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n"); } for ( $i = 0; !feof ($fp) ; $i++) { $usable_data[$i] = ""; $usable_data[$i] = fgets($fp,4096); // strstr did not fit (ask Rasmus why), so we compare each character if ( ($usable_data[$i][0] == "<" ) && ($usable_data[$i][1] == "?" ) && ($usable_data[$i][2] == "x" ) && ($usable_data[$i][3] == "m" ) && ($usable_data[$i][4] == "l" ) ) { $usable_data[0] = $usable_data[$i]; // save current field $i = 1; // just reset array to start } // there seems to be a "date" after the <?xml....we just delete this if ( ($usable_data[$i][0] == "<" ) && ($usable_data[$i][1] == "r" ) && ($usable_data[$i][2] == "d" ) && ($usable_data[$i][3] == "f" ) && ($usable_data[$i][4] == ":" ) ) { $usable_data[1] = $usable_data[$i]; // save current field $i = 2; // just reset array to start } } fclose($fp); return $usable_data; } Dan ------------------------------------------------------- __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com |
From: <php...@li...> - 2001-10-22 00:38:31
|
Hey Nigel, this one is easy to fix. Up to this point you guys were checking whether the local file existed and if it was readable, which would immediately eliminate the possibility of grabbing a web url...check out this change to the import from file function: /* snip beginning of import from file up to the following comment... */ // Check whether the file exists and is readable. if ( preg_match(";^http://;",$fileName) ) { // Read the content of the file. $content = implode("", file($fileName)); if ( empty($content) ) { // Display an error message. $this->_displayError("The url {$fileName} could not be found or read.", __LINE__); return; } } else { if (!file_exists($fileName) || !is_readable($fileName)) { // Display an error message. $this->_displayError("File {$fileName} could not be found or read.", __LINE__); return; } // Read the content of the file. $content = implode("", file($fileName)); } $this->importFromString(&$content); /* end function importfromfile */ Dan On Sunday 21 October 2001 10:01 am, you wrote: > Hello, > > I'm trying to write a little rdf parser (more exactly a file to read > php-nuke backend.php file) and it seems I fail to open a distant file. > > I have no problem with a local one but how can I access via > http://www........ ? > > Thanks in advance > > Luc > > > _______________________________________________ > Phpxpath-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpxpath-users ------------------------------------------------------- __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com |
From: <php...@li...> - 2001-10-22 00:35:31
|
Man, that was a ton easier than I expected it to be...I have written an updated appendChild which takes an xmlstring and merges it into the main node array without having to dump and reload the tree (ie, not using export and import, which was way slow)...this new recursive function is about as efficient as you can get with this sort of merge...hopefully we can get this into the CVS asap! Here is the php file and an xml example file which I use to demonstrate the new function. I presume you all have xpath.class.php Dan __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com |
From: <php...@li...> - 2001-10-22 00:33:06
|
Hey Nigel, just saw you fixed the & bug, that's sweet. I wanted to suggest one other change to the export function that I forgot to mention...I am going to dump some old code I modified here (since you just made changes to export) but you will see what I am talking about. I am attempting to clean up the export of data when a tag has "mixed" children...notice how I added the parameter $useIndent...the point here is if the node has mixed children, it turns off the linefeeding and indenting so that when you read in a file, dump it, read it in, dump it, etc... you don't end up with tons of empty lines in your mixed data....try it out now by putting some <br/> tags inside of your text node and you will see what I am talking about...cruise through this code to see my idea about adding a "mixed" child checker...is is pretty basic what I did and seems to work 100%... Dan here it is ---------------------------------------------------------------------------- function _export($highlight = array(), $currentXpath = '', $level = 0, $output_as_xml = 0, $useIndent = TRUE) { // If you are having difficulty using this function. Then set this to TRUE and // you'll get diagnostic info displayed to the output. $b_debug_this_function = FALSE; if ($b_debug_this_function) { $a_start_time = $this->_beginDebugFunction("_export"); echo "Highlights:\n"; print_r($highlight); echo "Root: $currentXpath\n"; echo "Level: $level\n"; echo "Output As Xml: $output_as_xml\n\n"; } ////////////////////////////////////////////// // Create a string to save the generated XML data. $xml = ''; // Create two strings containing the tags for highlighting a node. static $highlight_start = '<font color="#FF0000"><b>'; static $highlight_end = '</b></font>'; // Check whether a root node is given. if (empty($currentXpath)) { // Set it to the document root. $currentXpath = $this->root; if ($b_debug_this_function) echo "Changing root to $this->root as it is empty\n"; } // Generate a string to be displayed before the tags. $before = ''; // Calculate the amount of whitespaces to display. for ( $i=0; $i<$level; $i++) { //Add a whitespaces to the string. $before .= ' '; } // If there is no node at $currentXpath then we have nothing to export. Quit now if (!isSet($this->nodes[$currentXpath])) { if ($b_debug_this_function) echo "No node at $currentXpath, returning null\n"; // Not completely sure yet if this is fatal, but I think it is. $this->_displayError("When exporting the class, the node at $currentXpath ". "was not found. This is probably due to previous internal corruption."); return ''; } $theNode = &$this->nodes[$currentXpath]; // Check whether the node is selected. $selected = empty($highlight) ? FALSE : in_array($currentXpath, $highlight); $hasChildren = (sizeOf($theNode['children'])>0) ? TRUE : FALSE; $hasText = ($this->_textlength($theNode['text'])) ? TRUE : FALSE; /** added by Dan Allen **/ $isMixed = ($hasText && $hasChildren) ? TRUE : FALSE; // Check whether the node is selected for highlight. if ($selected ) $xml .= $highlight_start; // Now open the tag adding the whitespaces to the XML data. if ($level>0 && $useIndent) $xml .= "\n" . $before; if (empty($theNode['name'])) { // If the node has no name, then ring alarm bells. $this->_displayError("When exporting the class, the node at '{$currentXpath}' ". "was found to have no node name.", __LINE__, FALSE); return ''; } $xml .= ($output_as_xml) ? '<' : '<'; $xml .= htmlspecialchars($theNode['name']); // Check whether there are attributes for this node. if (count($theNode['attributes']) > 0) { if ($b_debug_this_function) echo "Outputing the attributes\n"; // Run through all attributes. $highlighting = FALSE; reset($theNode['attributes']); while (list($key) = each($theNode['attributes'])) { // Check whether this attribute is highlighted. if (is_array($highlight) and in_array($currentXpath.'/attribute::'.$key, $highlight)) { // Add the highlight code to the XML data. $xml .= $highlight_start; $highlighting = TRUE; } // Add the attribute to the XML data. $xml .= ' '.$key.'="'.htmlspecialchars($theNode['attributes'][$key]).'"'; // Check whether this attribute is highlighted. if ($highlighting) { // Add the highlight code to the XML data. $xml .= $highlight_end; $highlighting = FALSE; } } } if (empty($theNode['text'])) { $mergedText = ""; } else { $mergedText = implode('', $theNode['text']); } $useShortEnd = (!$hasChildren && empty($mergedText)); // Check whether the node contains character data or has children. if ($useShortEnd) { // Add the end to the tag. $xml .= ($output_as_xml) ? '/>' : "/>"; } else { // Close the tag. $xml .= ($output_as_xml) ? '>' : '>'; } // Check whether the node is selected. if ($selected ) $xml .= $highlight_end; // Check whether the node has children or not. if (!$hasChildren) { $xml .= $mergedText; } else { // Run through all children in the order they where set. $childSize = sizeOf($theNode['children']); for ($i=0; $i<$childSize; $i++) { if (!empty($theNode['text'][$i])) $xml .= $theNode['text'][$i]; // Generate the full path of the child. $fullchild = $currentXpath.'/'.$theNode['children'][$i]; // Add the child's XML data to the existing data. /** Modified by Dan Allen **/ $xml .= $this->_export(&$highlight, $fullchild, $level + 1, $output_as_xml, !$isMixed); } // Add the text fagment after the chield node if (!empty($theNode['text'][$i])) $xml .= $theNode['text'][$i]; } // Check if we have to set a ending </foo> tag if (! $useShortEnd) { // Add the whitespaces to the XML data, but only if there were kids. /** modified by Dan Allen **/ if ($hasChildren && !$isMixed) { $xml .= "\n".$before; } // Check whether the node is selected. Add the highlight code to the XML data. if ($selected) $xml .= $highlight_start; Add the highlight code to the XML data. // Add the closing tag. $xml .= ($output_as_xml) ? '</' : '</'; $xml .= $theNode['name']; $xml .= ($output_as_xml) ? '>' : '>'; // Check whether the node is selected. Add the highlight code to the XML data. if ($selected) $xml .= $highlight_end; // Add a linebreak. // --sam do we need it?? $xml .= "\n"; } ////////////////////////////////////////////// if ($b_debug_this_function) { $this->_closeDebugFunction($a_start_time, $xml); } // Return the XML data. return $xml; } /** * Returns the total length of all the text nodes * * This method is used to determine if the text of a given node exists, it needs * to sum up all the elements of the array * * @author Daniel Allen <big...@ya...> * @param array $text_array Array, from which the length with be determined * @return int $length Int the total length of the text in the node * @see _export() */ function _textlength($text_array) { $length = 0; foreach($text_array as $text) { $length += strlen($text); } return $length; } ------------------------------------------------------- __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com |
From: <php...@li...> - 2001-10-21 20:35:54
|
On the _handleFunction_sum function inside the for loop, the line saying: $value = $this->substringData($result[$i]); must be: $value = $this->substringData($results[$i]); Present in both 1.6 and 2.1b Nice lib, thanks!!! Samuel Romero |
From: <php...@li...> - 2001-10-21 16:55:09
|
Hello, I'm trying to write a little rdf parser (more exactly a file to read php-nuke backend.php file) and it seems I fail to open a distant file. I have no problem with a local one but how can I access via http://www........ ? Thanks in advance Luc |
From: <php...@li...> - 2001-10-19 23:41:01
|
> I was just writing because I haven't heard any > news recently...I logged onto CVS and saw that > changes have been made. Did anyone notice my bug > submission about the & sign problem? Found this today myself too, although I hadn't seen your bug report yet. Will look into v.soon hopefully and have changed a configuration so that I get a mail when you log a bug... Cheers Nigel =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb |