Prett
asked on
inserting XML Documents into databases
Hi,
I have an XML document which needs to be inserted into a database(in this particular case a Lotus DB).
The problem that I am having is that the column into which I want to insert this Document is a string..
so I somehow need to be able to convert the XML Doc into a string..
Does anyone have any snippets of code by which you can achieve this....i reckon I should be using a serializer in some sort of fashion..but I am unclear as to how to use it..
Any advice would be helpful..
Thanks for your time.
I have an XML document which needs to be inserted into a database(in this particular case a Lotus DB).
The problem that I am having is that the column into which I want to insert this Document is a string..
so I somehow need to be able to convert the XML Doc into a string..
Does anyone have any snippets of code by which you can achieve this....i reckon I should be using a serializer in some sort of fashion..but I am unclear as to how to use it..
Any advice would be helpful..
Thanks for your time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's not necessary to serialize it at all. Just call the toString() method (inherited from the Object class) on your XML object and it should be fine.