Closed Ajay-MS closed 8 years ago
your means the white space between the xml processor and the document root node?
@jindw Yes format is getting changed. But problem I was facing was not because of that. But still I want to know how i can format my xml again same as my original xml file.
I found one node module https://github.com/michaelrhodes/simple-xml-dom . But since there is dependency conflicts I haven't tried it.
maybe simple-xml-dom is a fast chooice xmldom is not focus on source edit before.
xmlprocessor and attributes whitespace will ignored
@jindw Yes I too didn't felt much confident with sinple-xml-dom, meanwhile i was also able to resolve problem i was facing. I am unblocked for now, Just asking this for curiosity.
Thanks 👍
fixed! but the \n in xml attribute is ignored
Hello Team,
I am using xmldom module for some development, its good module for making any operation in xml. But I endup with one error. Let's earlier i had A.xml, then using xmldom i did some changes to A.xml and write back to B.xml.
My application was working fine with A.xml but it' started saying B.xml is invalid( Unexpected end of file has occurred) . On comparing A.xml and B.xml , I found then while writing serialized data of dom to xml back, new line character after metadata and comments has been removed.
Can you help me by telling best way to write xmldom back to file in formatted form. I used following method