Skip to content

XML_RELEASE ​

XML_RELEASE releases held nodes in memory.

Syntax ​

leo-grammar
CC "Documentation" XML_RELEASE intValue
CC "Documentation" XML_RELEASE intValue

Parameters ​

  • <main-parameter> (intValue) - a positive integer value identifying the held nodes.

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success; 3 - XML_NOPARSER - a file has to be opened first; 15 - XML_NODENOTEXISTING - the element with the specified id is not existing are already discarded from memory;

Details ​

Called within a callback procedure..

See Also ​

Examples ​

asc
#
# parse the xml string: <MAIN><BROTHER name="Sepp"/><SISTER/><SUB/></MAIN>
#

# called for the BROTHER element
PROCEDURE REMEMBERNODE {
   CC "Documentation" XML_HOLD 2
}

# called for the SISTER element
PROCEDURE SEARCHANODE {
   CC "Documentation" XML_FIND holdid:2 attribute="name=Sepp"
   # returns the id for the BROTHER node.
   CC "Documentation" XML_RELEASE 2
   CC "Documentation" XML_FIND holdid:2 attribute="name=Sepp"
   # returns XML_NODENOTFOUND
}
#
# parse the xml string: <MAIN><BROTHER name="Sepp"/><SISTER/><SUB/></MAIN>
#

# called for the BROTHER element
PROCEDURE REMEMBERNODE {
   CC "Documentation" XML_HOLD 2
}

# called for the SISTER element
PROCEDURE SEARCHANODE {
   CC "Documentation" XML_FIND holdid:2 attribute="name=Sepp"
   # returns the id for the BROTHER node.
   CC "Documentation" XML_RELEASE 2
   CC "Documentation" XML_FIND holdid:2 attribute="name=Sepp"
   # returns XML_NODENOTFOUND
}

Versions and Changes ​

Available since ADOxx 1.3