Piotr,

Hi. That seems like the expected behaviour according to the docs:

https://doc.4d.com/4Dv17/4D/17.3/Overview-of-XML-DOM-Commands.300-4620648.en.html

"Error Handling  
Many functions in this theme return an XML element reference. If an error 
occurs during function execution (for example, if the root element reference is 
not valid), the OK variable is set to 0 and an error is generated.
In addition, the reference returned in this case is a sequence of zero "0" 
characters (16 characters in 32 bits, and 32 characters in 64 bits)."

Does that help? Are you testing for OK = 0 in your code?

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-----Original Message-----
From: 4D_Tech <[email protected]> on behalf of 4D Tech Mailing List 
<[email protected]>
Reply-To: 4D Tech Mailing List <[email protected]>
Date: Tuesday, 17 December 2019 at 09:08
To: 4D Tech Mailing List <[email protected]>
Cc: Piotr Chabot Stadhouders <[email protected]>
Subject: XML Null reference with DOM Find XML element

    Hi,
    
    4Dv17R6, Windows 64-bit
    What is the best way to test if a XML DOM element is a Null reference?
    Especially when using DOM Find XML element?
    
    The docs say “If the command has been executed correctly, the system 
variable OK is set to 1”
    Does it mean “if the command finds an element”? Finding nothing is also 
“executed correctly”
    
    In our app we tested on “0000000000000000”, but now it seems (64-bit?) that 
a null reference consists of 32 zeroes instead of 16
    I only see 1 mention about null reference in XML but it tals about 16 zeroes
    
    Does anybody know more about this?
    
    Gr,
    Piotr
    **********************************************************************
    4D Internet Users Group (4D iNUG)
    Archive:  http://lists.4d.com/archives.html
    Options: https://lists.4d.com/mailman/options/4d_tech
    Unsub:  mailto:[email protected]
    **********************************************************************


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to