Stax处理指令
我正在尝试使用 StAX 解析这样的处理指令:
<?item something="<some_element></some_element>"?>
StAX 似乎没有将其识别为处理指令。它发现这些事件:
< - CharacterEvent
?item something=" - CharacterEvent
<some_element> - StartEvent
</some_element> - EndEvent
"?> - CharacterEvent
难道整个事件不应该被视为单个ProcessingInstruction 事件吗?
I'm trying to parse a processing instruction like this using StAX:
<?item something="<some_element></some_element>"?>
StAX doesn't appear to recognize this as a processing instruction. It finds these events:
< - CharacterEvent
?item something=" - CharacterEvent
<some_element> - StartEvent
</some_element> - EndEvent
"?> - CharacterEvent
Shouldn't the whole thing be considered a single ProcessingInstruction event?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按我的预期工作。此代码:
打印此:
这是 Java 6。您使用的 Java 版本是什么?
Works as expected for me. This code:
Prints this:
That is with Java 6. What Java version are you using?