how to modify existing xml using swift for IOS

1.3k views Asked by At

I need some relevant solution for write xml using swift.

for example:

var rootElement = //get Element by XMLParser
var childElement = rootElement.child.element
childElement.text = "value changed"

now i want to set modified element to xml. so i am going to write whole xml by converting rootElement to string and store in xml file.

I need such kind of XML writer with swift.

Any hint or reference would be most appreciate.

1

There are 1 answers

1
Keith Ellis On

Use NSXMLDocument generate XML string.