|
| Using xmlDocument as parameter causes RUNTIME ERROR |
| Iniciado por vvido, 28,mar. 2018 10:27 - 2 respuestas |
| |
| | | |
|
| |
Miembro registrado 94 mensajes |
|
| Publicado el 28,marzo 2018 - 10:27 |
I am trying to do some work with xmlDocument. When I pass the name of xmlDocument as string the code works, but when I pass the name of xmlDocument as variable, the code crashes with runtime error.
I am working with the same XML source file in both cases.
To demonstrate the problem I have isolated the simplest possible example. Test 1 finds the element as expected. Test 2 crashes in XMLFind.
myDoc is string = fLoadText( sFName) XMLDocument("XMLMain", myDoc) r = XMLFind ("XMLMain", "TestNumber", XMLElement) IF True = r Info ("test1 - FOUND ") ELSE Error ("test1 - NOT FOUND " + ErrorInfo()) END
myXml is xmlDocument myXml = XMLOpen(sFName,fromFile) r = XMLFind (myXml, "TestNumber", XMLElement) IF True = r Info ("test2 - FOUND ") ELSE Error ("test2 - NOT FOUND " + ErrorInfo()) END
What am I missing ? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,abril 2018 - 17:24 |
= XMLDocument( [, [,
This procedure doesn't accept a xmlDocument variable but needs the name of a XML Document that was created by using the procedure XMLDocument() |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 94 mensajes |
|
| Publicado el 04,abril 2018 - 08:53 |
Thanks for your reply. I have checked the help again and realized that this was no possible.
Unfortunately the library is not designed to allow parameterization. This will cause lots of code repetition. |
| |
| |
| | | |
|
| | | | |
| | |
|