revDeleteXMLNode - invalid number of arguments???

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
palanolho
Posts: 122
Joined: Sat Apr 27, 2013 11:40 pm

revDeleteXMLNode - invalid number of arguments???

Post by palanolho » Fri Oct 25, 2013 7:47 pm

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

palanolho
Posts: 122
Joined: Sat Apr 27, 2013 11:40 pm

Re: revDeleteXMLNode - invalid number of arguments???

Post by palanolho » Sat Oct 26, 2013 10:42 am

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.

Post Reply