Quite honestly, Benjamin, the best way to go about this is to either:

A) Load the document into a DOM and then change all the keys and then
serialize it back out, or
B) Create a SAX ContentHandler that would do the same thing (more time
to develop, faster and more efficient in the end)

Digester, although it could be coerced into doing this, is not the tool
for this job.

Sorry, but hope that helps,
Scott

> -----Original Message-----
> From: Benjamin Reitzammer [mailto:breitzammer@;t-systems.com] 
> Sent: Tuesday, November 12, 2002 7:34 AM
> To: [EMAIL PROTECTED]
> Subject: [digester]
> 
> 
> Hello,
> I want to "transform" a XML document, but not in the sense of XSLT. I 
> have a lot of documents, that contain primary keys of a 
> database, like: <report id="123"> ... </report>
> 
> Now the DBA must do something with the db (don't ask me what it is, I 
> simply don't know it), that will change almost all of the 
> primary keys, 
> which means, that the references in my XML documents will be wrong. 
> Therefore I will have to read/parse the XML documents, 
> transform all of 
> the "old" primary keys to the "new" primary keys, and write out the 
> documents again.
> 
> Because I used Digester quite often already, I wondered if it 
> could be 
> used for this problem.
> 
> My question is (finally): Can Digester tell me, which tags he 
> has parsed 
> already, and is parsing at the moment? Then I could simply write this 
> data, to a writer of my choice, and while parsing the primary keys, I 
> could transform them and write them out.
> 
> I haven't found anything, how this could be done, with the default 
> functionality of digester.
> Any ideas, how I could extend digester to achieve this?
> 
> thanks
> 
> Benjamin
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:commons-user-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>

Reply via email to