Page 1 of 1

revDeleteXMLNode - invalid number of arguments???

Posted: Fri Oct 25, 2013 7:47 pm
by palanolho
greetings everyone,

I'm having a small problem and I'm not understanding why.

I'm trying to delete a record from my XMLtree

Code: Select all

<token>
	<single tknID="1">11111</single>
	<single tknID="2">22222</single>
	<single tknID="3">33333</single>
</token>
and I'm doing it like this:

Code: Select all

revDeleteXMLNode(tTreeID, tSubNode)
Where tTreeID = 4 (the id of the tree) and tSubNode = /token/single[2]

for me it seems correct, however, the system gives me the following error when executing the handler:

Code: Select all

stack "codeLibrary01": execution error at line n/a (External handler: exception) near "xmlerr, invalid number of arguments"

Anyone has any idea what may be the problem?

Many thanks in advance
- Miguel

Re: revDeleteXMLNode - invalid number of arguments???

Posted: Sat Oct 26, 2013 10:42 am
by palanolho
I found the problem ...

the problem were with the "( )" ....

calling the command like this : revDeleteXMLNode(4, "/tokens/single[2]")
Gives an "invalid nr or arguments".

If I call the handler like this: revDeleteXMLNode 4, "/tokens/single[2]"
It works just file ....

This is a little frustrating... :(

Anyway, I'll try to make a suggestion to about this.