Re: [xml] Tool to convert malformed XML into valid XML

Dear Subrata Dasgupta,

On Sat, Jul 20, 2013 at 1:07 PM, Subrata Dasgupta  wrote:

Respected Sir,

While working in a project I have faced huge problems with malformed XML files. Most of the times few 
opening or closing tags are missing in those files and some times though XML is not malformed but it is not 
matching with the DTD. It is very very hard to fix this by hand because XMLs are very big more than 30 MB 
to 2 GB.

So I am looking for a open source tool which can detect and fix the malformed xml with the help of a DTD or 
XSD automatically(at least where there is no ambiguity). But till now I am unable to find such a tool. But 
after googling it seems to me that we can write such tool using GNU libxml open source library.

As far as I know, this is in principle not possible. XML parsers
(including libxml2) are required to treat malformed XML as a fatal
error; which means that you won't get any useful parsing result except
an error code.

GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]