Re: xpath and SimpleXML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I can see your logic.. however the input for my xpath query is an object (I 
can do a sprintf on the input $var1, which I may need also).

$result = $anything->xpath("//ROW[$var1 > $var2]");

I've tried to ereg_replace the quotation marks out of the object... but no 
go.

So the question is how to  get quotation marks out of on object containing 
this:

<__LogicalDisk_C_____Disk_Time_>"8.0669532236989439e-006"</__LogicalDisk_C_____Disk_Time_>
<__LogicalDisk_C_____Free_Space_>"72.189023431357128"</__LogicalDisk_C_____Free_Space_>

Cheers

Dave.


"Matthew Sims" <matt@xxxxxxxxxxxxxxxx> wrote in message 
news:42517.208.44.135.39.1097185373.squirrel@xxxxxxxxxxxxxxxx
>> So, using xpath, I have constructed the following function. The problem 
>> is
>> the quotes "" around the number. xpath is treating it as a string, I
>> believe.
>
> Would sprintf() work for this?
>
> Something like:
>
> $num = sprintf("%d", $xpathNum);
>
> I haven't tested this.
>
> -- 
> --Matthew Sims
> --<http://killermookie.org> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux