Skip to main content
Question

Modify and Write attributes with XML Writer

  • October 1, 2018
  • 1 reply
  • 13 views

Hello. I have to read a number of xml files that are "version 3", modify the contents and write them out as "version 4". The changes include renamed xml tags, some reorganization, addition of some new tags etc. When I read in an xml it deserializes the contents into attributes (which is really great!). I'd like to make my modifications to these attributes (and their values), then write out the result. Instead it writes back out the original file contents which it has saved in the attribute xml_fragment. Is there a way I can tell the writer to output the contents of the attributes and not the xml_fragment?

1 reply

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • October 1, 2018

I must admit I've never actually used the XML Writer, I use the XMLTemplater/XMLFormatter instead.

 

 

If the restructuring is fairly simple, the XMLUpdater also works well (send the results to a text writer).


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings