How do I format and read XML processing instructions using Java StAX?

后端 未结 3 1477
旧巷少年郎
旧巷少年郎 2021-01-21 10:53

First, how do I format the XML processing instruction, is it:


Usi

3条回答
  •  有刺的猬
    2021-01-21 11:48

    I think that this notion of processing instructions having attributes comes from some old xml manuals. At one point there was discussion of recommending PIs to honor or require such structuring. However, the official xml specification has never mandated or even recommended such usage.

    So basically you do have to parse contents yourself -- they may be in any format, but if you do know that it uses attribute notation you can parse it.

    As far as I know, none of Java xml parsers or processing packages support such usage, unfortunately.

提交回复
热议问题