I've a xml-file where not all elements are properly closed.
Is it possible to automatically close all open elements using c#.
No, you have to walk the file and find the improperly formed parts and fix
them.
The XML classes can help you if you have a schema, by identifying the
problems. There are also third party components for this that might even
work better (perhaps even a component that can "fix" these issues?).
Ultimately, you have to find the problem spots and fill in. And, yes, this
is a pain.
Another option is figuring out why the "XML" is not properly formed and
eliminating the issue on that end.
Peace and Grace,
--
Gregory A. Beamer (MVP)
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************