Re: xpath and SimpleXML

From: Date: Fri, 08 Oct 2004 01:17:07 +0000
Subject: Re: xpath and SimpleXML
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-198915@lists.php.net to get a copy of this message
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@killermookie.org> wrote in message news:42517.208.44.135.39.1097185373.squirrel@208.44.135.39... >> 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>

« previous php.general (#198915) next »