Thursday, May 9, 2013

XMLType DOMDocument and pointers

Ran across this post on the OTN Forums last week.Dynamically adding attribute based on PL/SQL function
The part that interested me was Odie's second post. If you look closely at his second post (first example) he basically does
=======================
xmltype := XML_text
DOMDocument := New Document (xmltype)
... modify DOMDocument
Free DomDocument
Output xmltype.getClobVal
=======================
So with that example, he shows that even though the DOMDocument variable is being modified, the changes still show up in the XMLtype variable. The only way that can be done is through the use of a pointer the two variables are using to reference the same memory. Very interesting to me as it was something new.

About Me

I do what I do because I like it. I've had exposure to a lot of different products/technology over the time. I started with COBOL and flat files on a mainframe. I've used VSAM and DB2 there as well. Linux and Solaris have crossed my path several times. XML, XSLT and schemas have been friends for a while. SQL has seen me through MS Access, DB2 and Oracle. I've worked with 2 versions of DB2 and 3 of Oracle. There has been many other things as well, too small to mention.