manupulating a xml-file

J

Jan Müller

hi,

at first: excuse me for my bad english :)

i want to manupulate a element-text of a xml-file like this:
<element>text</element> ==> <element>manupulated text</element>.
for the parsing of the xml-file i use SAX, but i have no idea how i have to
manipulate the text and write it back into the xml-file.

can anyone give me a tip to solve my problem?

many thanky,
jan
 
A

Arne Vajhøj

Jan said:
i want to manupulate a element-text of a xml-file like this:
<element>text</element> ==> <element>manupulated text</element>.
for the parsing of the xml-file i use SAX, but i have no idea how i have to
manipulate the text and write it back into the xml-file.

SAX is purely an API for reading XML, so SAX in itself does not
provide any way of writing an updated file.

But it is relative simple to do - you can write out
start tag with attributes in startElement and
modified content + end tag in endElement.

Arne
 
J

Jan Müller

hi arne,

thank you very much for the idea. i will try your suggestion.

thx,
jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top