Re: how to change the value of a specific node

2004-05-19 Thread Cristina Cioroboiu
We need to post some xml documents  in db2 database.    I need a part of the message, that structure to go in a column. the rest of the elements will go every one in his column. I didn't find for db2 only 2 ways to work with xml ( an xml column or spread xml simple elements into differents column)

Re: how to change the value of a specific node

2004-05-19 Thread Gareth Reakes
Hey, in that case, take a look at the serializer (DOMWriter). Write in to memory, encode it. Take original, delete all its child nodes and add the text node you created when encoding. Be aware of issues like namespace normalization (take a look at normalize document) if you are are going to

Re: how to change the value of a specific node

2004-05-19 Thread Cristina Cioroboiu
Thanks Gareth.   I have this structure  as partof my main document:       value 1     value 2     .     value n   I want to take this structure and encode it in Base 64.   I serialize this and I want to obtain Base64 value as a part of my main document.   After

Re: how to change the value of a specific node

2004-05-19 Thread Gareth Reakes
Hi, I don't fully understand what you are asking, but I will have a go at answering. When you say you want to base64 encode an element and its descendants, I assume you mean the text content of them? If so you can call getTextContext. If not you will have to serialize and then encode. For t

how to change the value of a specific node

2004-05-18 Thread Cristina Cioroboiu
I have a DOMDocument.I use Xalan to determine a specific section of an DOMDocument (Xpath determined). I want  encode this in Base64 ( the element and probably its descendants ).   I have the node now and I want to replace with  this new value the corresponding element (tree) in the original DOMDoc