M
Markus
At this time I'm using JDOM (but if you suggest another lib I can
change it).
How would you implement an XMLCorrector that can perfom the following
tasks.
* find out if XML is well-formed (this can JDOM)
--> If XML is not well-formed, find out the "corrupt" element (I
don't no such task in JDOM)
* validate XML against schema (I don't know how to do this in JDOM)
--> If XML is not valid, then find out the "corrupt" element
I think this are the mainfeatures which I want to do.
Example:
?<?version="1.0" encoding="UTF-8"?>
<root>
<sub>öäü</sub>
<sub>
<sub2>
</sub>
</root>
This is not a valid XML, of course because ther is a leading ?, öäü
are not valid in UTF-8 and there is no closing-tag for sub2.
I want to write a Programm which find out these errors and correct some
automaticly (like the leading ? or the encoding) and let me choose what
to do with sub2.
It should also validate against a schema a get me all invalid elements,
of couse.
Any suggestions for this problem(s)?!?
Kind regards
Markus
change it).
How would you implement an XMLCorrector that can perfom the following
tasks.
* find out if XML is well-formed (this can JDOM)
--> If XML is not well-formed, find out the "corrupt" element (I
don't no such task in JDOM)
* validate XML against schema (I don't know how to do this in JDOM)
--> If XML is not valid, then find out the "corrupt" element
I think this are the mainfeatures which I want to do.
Example:
?<?version="1.0" encoding="UTF-8"?>
<root>
<sub>öäü</sub>
<sub>
<sub2>
</sub>
</root>
This is not a valid XML, of course because ther is a leading ?, öäü
are not valid in UTF-8 and there is no closing-tag for sub2.
I want to write a Programm which find out these errors and correct some
automaticly (like the leading ? or the encoding) and let me choose what
to do with sub2.
It should also validate against a schema a get me all invalid elements,
of couse.
Any suggestions for this problem(s)?!?
Kind regards
Markus