Return type:
Applies to:
NODE-VALUE-TO-MEMPTR ( memptr )NODE-VALUE-TO-MEMPTR( ) frees the memory currently allocated by memptr (if any), allocates sufficient memory to the MEMPTR to accommodate the node, and copies the node to the MEMPTR.If X-NODEREF:NODE-VALUE is “” (the empty string), the resulting memptr has a size of zero.
Note: When you no longer need the memory used by memptr, you must free it yourself. To do so, use the SET-SIZE statement.
IF my-xnoderef:SUBTYPE = "#TEXT" THEN DO:IF LENGTH(my-xnoderef:NODE-VALUE, "RAW") > 32000 THEN DO:ASSIGNsucces = my-xnoderef:NODE-VALUE-TO-MEMPTR(my-memptr)pos = 1len = 32000.DO WHILE pos < GET-SIZE(my-memptr):my-nodeval = GET-STRING(my-memptr, pos, len)./* Do something with my-nodeval */pos = pos + len.END.SET-SIZE(my-memptr) = 0.END.ELSEmy-nodeval = my-xnoderef:NODE-VALUE.END.For more information on accessing XML documents using the Document Object Model (DOM) interface, see OpenEdge Development: Working with XML.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |