英文:
How to parse a document with html tags?
问题
有一个具有浮动结构的文档:
一些随机文本
不同来源的格式
<!-- customtag -->
<!-- subtag结构 --> ... <!-- subtag结束 -->
我正在寻找一种方法,可以在解析custom tag
块并将其转换为对象(每个文档可以有多个)的任务中应用。
目前正在考虑JAXB,StAX,JSoup以及谷歌提供的与此相关的任何内容。JAXB提供了一个良好的起点,但我看不到如何配置它的tag结构
。
英文:
Have a document with floating structure:
> some random text
>
> formatting for different source
>
> <!-- customtag --->
>
> <!-- subtag structure --> ... <!-- subtag END -->
Am looking for something, which I can actually apply at a task of parsing the custom tag
block and generate an object out of it (multiple per document).
Currently looking in the direction of JAXB, StAX, JSoup and anything google can provide in the matter. JAXB gives a good start, but I cannot see how to configure it's tag structure
.
专注分享java语言的经验与见解,让所有开发者获益!
评论