跳转到主要内容

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

当您初次登录到 developerWorks 时,将会为您创建一份概要信息。您在 developerWorks 概要信息中选择公开的信息将公开显示给其他人,但您可以随时修改这些信息的显示状态。您的姓名(除非选择隐藏)和昵称将和您在 developerWorks 发布的内容一同显示。

所有提交的信息确保安全。

  • 关闭 [x]

当您初次登录到 developerWorks 时,将会为您创建一份概要信息,您需要指定一个昵称。您的昵称将和您在 developerWorks 发布的内容显示在一起。

昵称长度在 3 至 31 个字符之间。 您的昵称在 developerWorks 社区中必须是唯一的,并且出于隐私保护的原因,不能是您的电子邮件地址。

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

所有提交的信息确保安全。

  • 关闭 [x]

XML and Java technologies: Data binding, Part 2: Performance

After kicking the tires in Part 1, take data binding frameworks out for a test drive

Return to article


Code and test data download

Downloading the code jar gives you full source code for the test program and all the data binding framework test cases. When the jar is unpacked (using jar -xvf xmlbind.jar" in an empty directory, or using a zip file tool) you'll find a test.sh file in the root directory. This is the actual Linux script I used to generate the results shown in the charts, and you can use it as an example of the command line parameters expected by the test program -- but note that to run it you'll need to also download the jar files for any frameworks you want to test and copy them into the lib subdirectory (see the Resources section for links to the framework sites). The jar files for the test program itself, the JiBX runtime, and the XMLPull parser used by the JiBX are already present in the lib subdirectory, and the XML documents used are in the docs subdirectory (along with the JavaDocs for the code).

If you want to see the meanings of the command line parameters used by the test program, run the command line:

java -cp lib/xmldb.jar com.sosnoski.xmlbench.BindBench

and you will see a listing of all the options.

The JiBX mapped binding code included in the com.sosnoski.xmlbench.bindings.jibxmap package classes represents an earlier version of the JiBX framework than what is currently under development. The runtime methods call by the hand-coded marshalling and unmarshalling methods have not changed significantly, but the XDoclet format shown in the files is no longer accurate. For details of the current format, see the JiBX site (linked in Resources).