V_Dev
V_Dev

Reputation: 93

< issue in AXIOM parser

Axiom parser converts "&lt ;" to "<" if it is followed by empty node.This makes the xml content invalid.

XML Input:

case 1: <A> test <B></B> &lt; test1 </A>
case 2: <A> test <B>ear</B> &lt; test1 </A>

XML Output:

case 1: <A> test <B/> < test1 </A> [Incorrect]
case 2: <A> test <B>ear</B> &lt; test1 </A> [Correct]

Axiom Code:

InputStream ina = new FileInputStream(fileName);
OMElement root = OMXMLBuilderFactory.createOMBuilder(ina).getDocumentElement();

Is there any way to handle this scenario ?

Upvotes: 0

Views: 99

Answers (1)

Andreas Veithen
Andreas Veithen

Reputation: 9154

This is AXIOM-509. A fix for that issue was released in Axiom 1.4.0.

Upvotes: 0

Related Questions