PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Stéphane Devouard on October 11, 2022, 03:59:41 AM

Title: *obj/xml issue
Post by: Stéphane Devouard on October 11, 2022, 03:59:41 AM
Hi

There is a minor issue in *obj/xml with the find_node() method

Code: [Select]
-}x=new("*obj/xml","<prestashop><products><product><id>1</id></product></product
s></prestashop>")
-}
-}xpath$="prestashop/products/product/id"
-}? x'find_node(xpath$)'value$
1
-}?xpath$
prestashop

I can work around by sending the parameter by value with parentheses or as an expression such as xpath$+""

But I think it should be handled in the method itself by protecting the _tag$ input parameter

TIA
Title: Re: *obj/xml issue
Post by: Mike King on October 11, 2022, 09:29:43 AM
Thanks, we have adjusted this for the next build.

You can apply the same correction by changing line 238 in *obj/xml.pvc from:

0238 ENTER _tag$,_after=0

to

0238 ENTER (_tag$),_after=0