[phpXML] RE: [phpXML] Re: [phpXML] RE: [phpXML] Bug in setAttributes

2001-10-01 Thread o . talens
Title: RE: [phpXML] Re: [phpXML] RE: [phpXML] Bug in setAttributes





Sam,


For example, I want to sort on pr_name. (And when I insert a new product, I want this new node to be inserted in the correct order)

Oliver Talens



             
      
  
  
    



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: maandag 1 oktober 2001 9:23
To: [EMAIL PROTECTED]
Subject: [phpXML] Re: [phpXML] RE: [phpXML] Bug in setAttributes



>How do I sort in phpxml on a certain attribute?
>Oliver Talens


?? be more specific. give an sample. 
-- 
Sam Blum <[EMAIL PROTECTED]>


===
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  user discussion list. To unsubscribe, please visit https:[EMAIL PROTECTED]/




[phpXML] Re: [phpXML] RE: [phpXML] Bug in setAttributes

2001-09-30 Thread bs_php

>How do I sort in phpxml on a certain attribute?
>Oliver Talens

?? be more specific. give an sample. 
-- 
Sam Blum <[EMAIL PROTECTED]>

===
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  user discussion list. To unsubscribe, 
please visit https:[EMAIL PROTECTED]/

___
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc



[phpXML] RE: [phpXML] Bug in setAttributes

2001-09-30 Thread o . talens
Title: RE: [phpXML] Bug in setAttributes





How do I sort in phpxml on a certain attribute?


Oliver Talens





[phpXML] Bug in setAttributes

2001-09-26 Thread nigelswinson

> just patched phpxml 1.N.5:
>
> // OLD --
> function setAttributes($absoluteXPath, $attribute) {

>
> Tell me where the $path variableis set and why the parameter
> $attribute
> is called $attributes in the function...
>
>
> // NEW --
> function setAttributes($absoluteXPath, $attributes) {


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  user discussion list. To unsubscribe, 
please visit https:[EMAIL PROTECTED]/

___
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc



[phpXML] RE: [phpXML] Bug in setAttributes

2001-09-26 Thread o . talens
Title: RE: [phpXML] Bug in setAttributes



Thanks 
all folks,
 
Oliver

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]Sent: woensdag 26 
  september 2001 13:37To: [EMAIL PROTECTED]Subject: 
  [phpXML] Bug in setAttributes
  
After using setAttributes 
($xml->setAttributes("/users[1]/Nodename[1]",array("atr1","atr2"));) I 
get the following incorrect result:
   
Where do the 0 and 1 come from? 
  The array that you use for setAttributes 
  should be an associative array, so you are effectively doing:
      setAttributes 
  ($xml->setAttributes("/users[1]/Nodename[1]",array(0 => "atr1", 1 => 
  "atr2"));)
   
  Hence you end up with:
   
      
   
  Try:
   
  
      setAttributes 
  ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1" => 
  "value1", "atr2" => "value2"));)
   
  ===For the most recent version of phpxml, 
  V1.N.X, and an archive of this listvisit:  http://www.sourceforge.net/projects/phpxmldb


[phpXML] Bug in setAttributes

2001-09-26 Thread nigelswinson
Title: RE: [phpXML] Bug in setAttributes




  After using setAttributes 
  ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1","atr2"));) I get 
  the following incorrect result:
     
  Where do the 0 and 1 come from? 
The array that you use for setAttributes 
should be an associative array, so you are effectively doing:
    setAttributes 
($xml->setAttributes("/users[1]/Nodename[1]",array(0 => "atr1", 1 => 
"atr2"));)
 
Hence you end up with:
 
    
 
Try:
 

    setAttributes 
($xml->setAttributes("/users[1]/Nodename[1]",array("atr1" => 
"value1", "atr2" => "value2"));)
 
===For the most recent version of phpxml, 
V1.N.X, and an archive of this listvisit:  http://www.sourceforge.net/projects/phpxmldb


[phpXML] RE: [phpXML] Bug in setAttributes

2001-09-26 Thread o . talens
Title: RE: [phpXML] Bug in setAttributes





After using setAttributes ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1","atr2"));) I get the following incorrect result:

  


Where do the 0 and 1 come from?


Oliver





-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: woensdag 26 september 2001 10:02
To: [EMAIL PROTECTED]
Subject: [phpXML] Bug in setAttributes



Hi,


just patched phpxml 1.N.5:


// OLD --
function setAttributes($absoluteXPath, $attribute) {
  // The attributes parameter should be an associative array.
  if (!is_array($attributes)) return;
  // Add the attributes to the node.
  if (isSet($this->nodes[$path]['attributes'])) {
    $this->nodes[$path]['attributes'] =
    array_merge($this->nodes[$path]['attributes'], $attributes);
  } else {
    $this->nodes[$path]['attributes'] = $attributes;
  }
}


Tell me where the $path variableis set and why the parameter
$attribute
is called $attributes in the function...



// NEW --
function setAttributes($absoluteXPath, $attributes) {
  // The attributes parameter should be an associative array.
  if (!is_array($attributes)) return;
  // Add the attributes to the node.
  if (isSet($this->nodes[$absoluteXPath]['attributes'])) {
    $this->nodes[$absoluteXPath]['attributes'] =
    array_merge($this->nodes  [$absoluteXPath]['attributes'],
$attributes);
  } else {
    $this->nodes[$absoluteXPath]['attributes'] = $attributes;
  }
}



BTW, did anyone check the code before releasing it?
How else could one miss those bugs like the
"$this ->" thing and the setAttributes-function,
that did not work at all.


CU, Axel
--
[EMAIL PROTECTED]


PS, soory for my bad english...


--
This message has been sent through the  user discussion list. To unsubscribe, please visit https:[EMAIL PROTECTED]/




[phpXML] Bug in setAttributes

2001-09-26 Thread a . tietje

Hi,

just patched phpxml 1.N.5:

// OLD --
function setAttributes($absoluteXPath, $attribute) {
  // The attributes parameter should be an associative array.
  if (!is_array($attributes)) return;
  // Add the attributes to the node.
  if (isSet($this->nodes[$path]['attributes'])) {
$this->nodes[$path]['attributes'] =
array_merge($this->nodes[$path]['attributes'], $attributes);
  } else {
$this->nodes[$path]['attributes'] = $attributes;
  }
}

Tell me where the $path variableis set and why the parameter
$attribute
is called $attributes in the function...


// NEW --
function setAttributes($absoluteXPath, $attributes) {
  // The attributes parameter should be an associative array.
  if (!is_array($attributes)) return;
  // Add the attributes to the node.
  if (isSet($this->nodes[$absoluteXPath]['attributes'])) {
$this->nodes[$absoluteXPath]['attributes'] =
array_merge($this->nodes  [$absoluteXPath]['attributes'],
$attributes);
  } else {
$this->nodes[$absoluteXPath]['attributes'] = $attributes;
  }
}


BTW, did anyone check the code before releasing it?
How else could one miss those bugs like the
"$this ->" thing and the setAttributes-function,
that did not work at all.

CU, Axel
--
[EMAIL PROTECTED]

PS, soory for my bad english...

--
This message has been sent through the  user discussion list. To unsubscribe, 
please visit https:[EMAIL PROTECTED]/

___
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc



[phpXML] Bug?????

2001-09-06 Thread sdowell

I posted a note about this a while back and got a response but have lost it.

I've got a little more insight now.

I have the following code:


$cats = $xml->evaluate("//SCAN/IP[@value=".$ip_ip."]/VULNS[1]/CAT");

foreach ($cats as $cat)
{  

$cat_atts = $xml->get_attributes($cat);
$vuln_cat = $cat_atts["value"];
$vuln_port = $cat_atts["port"];
echo $cat."  ".$vuln_cat."";

$vulns =
$xml->evaluate("//SCAN/IP[@value=".$ip_ip."]/VULNS[1]/CAT[@value=".$vuln_cat
."]/VULN");

foreach ($vulns as $vuln)
{
echo $vuln."";
$vuln_atts = $xml->get_attributes($vuln);
$vuln_sev = $vuln_atts["severity"];


-

When the loop gets to the last $cat, it picks up the $vulns from all of the
previous $cats as well as the last one.
This can be seen in the following diagnostic print out. There are no * or
other special characters involved. Is this a bug or am I missing something. 

It only seems to happen on the last group.

/SCAN[1]/IP[1]/VULNS[1]/CAT[1] dns
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[1]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[2]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[3]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[4]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[5]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[6]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[7]
/SCAN[1]/IP[1]/VULNS[1]/CAT[2] identd
/SCAN[1]/IP[1]/VULNS[1]/CAT[2]/VULN[1]
/SCAN[1]/IP[1]/VULNS[1]/CAT[3] tcp-ip
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[1]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[2]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[3]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[4]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[5]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[6]
/SCAN[1]/IP[1]/VULNS[1]/CAT[1]/VULN[7]
/SCAN[1]/IP[1]/VULNS[1]/CAT[2]/VULN[1]
/SCAN[1]/IP[1]/VULNS[1]/CAT[3]/VULN[1]
/SCAN[1]/IP[1]/VULNS[1]/CAT[3]/VULN[2]
/SCAN[1]/IP[1]/VULNS[1]/CAT[3]/VULN[3]
/SCAN[1]/IP[1]/VULNS[1]/CAT[3]/VULN[4]

Steve Dowell

--
This message has been sent through the  user discussion list. To unsubscribe, 
please visit https:[EMAIL PROTECTED]/

___
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc