FasterXML / FasterXML/jackson-dataformat-xml

Support extracting the whole DOM model under given XML element

未关闭
#417 1 条评论 23 个 reaction 已指派 0 人 在 GitHub 查看
most-wanted
主要语言
Java
星标
631
派生
246
平均合并
7 天 9 小时
30 天内合并 PR
13

描述

Let's have a following XML:
```

value

text
...

```
Support use-case of extracting contents of the whole DOM structure. can be any proper XML, text or CDATA block of unknown structure. The idea is to make it possible to extract such structure and save it rawElement field of your POJO.

Currently (2.11) to achieve it, inside a JsonDeserializer for rawElement you can read tree using json parser, however it's not possible to get XML structure. You can use the JsonNode & put it into XMLMapper.writeValueAsString, still it's a workaround rather than a solution.

According to Tatu from jackson-user:
"it'd be necessary to expose a "native" XML
type, like `org.w3c.dom.Node` (or `Element`?).
Currently binding would try to re-parse textual content, but it would
be relatively easy to change that, possibly along
with configuration setting to select new or old approach."

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。