Save writer ; writer. Close ;. Kamal Kamal 2, 2 2 gold badges 35 35 silver badges 48 48 bronze badges. It will not work, because if the original XML file is chars long, and after changing the xmldocument it contains only chars left, you will be left with chars at the end of the correct XML file which do not get deleted.
Hence why the validation error e. Alternatively even this would work CreateTextNode "test" ; xmlDoc. AppendChild node ; xmlDoc. Bharath K Bharath K 2, 1 1 gold badge 13 13 silver badges 18 18 bronze badges. Well, this might work but I think it will be much more efficient to just set the length to zero and call Save — A9S6.
This won't work because to file will be i use at that time so i can't never save the file.. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
Featured on Meta. Value writer. WriteEndElement ' einde userSetting Next writer. WriteEndElement ' einde userSettings writer. WriteEndElement ' einde configuration writer. WriteEndDocument writer. Item 0. Item 1. Attributes newnodeAttr. Wednesday, July 13, PM. Hi, I found the problem. Open, IO.
ReadWrite, IO. ReadWrite xmlDoc. Load fs. Seek 0, IO. Begin fs. SetLength 0 xmlDoc. Save fs fs. Copy Code. Posted May am Ben Paxton.
Add a Solution. Instance May am. Just add the path to the filename. Top Rated Most Recent. Accept Solution Reject Solution. So, what is the issue? Just modify the path variable as below: C. Posted May am JF Posted May am Sandeep Mewara. This one is the best solution i've found to save the xml "doc" well formatted to file "data. Posted Oct am Member Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account. This email is in use.
Do you need your password?
0コメント