0

I am looking at a set of parsers generated for Atom, XAL, Kml etc. seemingly using an automated technique with a XML pull based parser. The clue towards the automation is presence of "package.html" in all XML-to-Java mapped classes folders. I would like to produce a similar one for the rather large Collada 1.4 spec. My first attempt with Altova ran into small problems due the "enum" keyword. I am sure I can fix it in the next run with appropriate renaming. Khronos admit to not designing the 1.4 spec to being automated parser generation friendly.

The actual parsers i.e. XAL parser, Atom parser etc. implement the XMLEventParser interface. I would like to know if anybody has encountered/used this pattern. If so which tool can be used to map the XSD to a class set simply giving access to the data components of the nodes using getters and setters.

4

1 に答える 1

0

あなたの質問を理解しているかどうかわかりませんが、Atom のような XML 形式を処理し、getter/setter を使用してオブジェクトで表現したいようです。これは、JAXB を使用して簡単に実行できます。

例については、次を参照してください。

于 2010-12-04T12:52:47.970 に答える