简体   繁体   English

< AXIOM 解析器中的问题

[英]< issue in AXIOM parser

Axiom parser converts "&lt ;" Axiom 解析器转换“&lt ;” to "<" if it is followed by empty node.This makes the xml content invalid.如果后面是空节点,则改为“<”。这会使 xml 内容无效。

XML Input: XML 输入:

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

XML Output: XML 输出:

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 ?有没有办法处理这种情况?

This is AXIOM-509 .这是AXIOM-509 A fix for that issue was released in Axiom 1.4.0. Axiom 1.4.0 中发布了针对该问题的修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM