Axiom parser converts "< ;" to "<" if it is followed by empty node.This makes the xml content invalid.
XML Input:
case 1: <A> test <B></B> < test1 </A>
case 2: <A> test <B>ear</B> < test1 </A>
XML Output:
case 1: <A> test <B/> < test1 </A> [Incorrect]
case 2: <A> test <B>ear</B> < test1 </A> [Correct]
Axiom Code:
InputStream ina = new FileInputStream(fileName);
OMElement root = OMXMLBuilderFactory.createOMBuilder(ina).getDocumentElement();
Is there any way to handle this scenario ?
This is AXIOM-509. A fix for that issue was released in Axiom 1.4.0.