build.txt
来自「目前在JAVA下编程时对XML的操作很重要」· 文本 代码 · 共 32 行
TXT
32 行
Building XMLBeans with Interface extension feature, and PrePost extension feature is divided into four steps.
1> Put xml comments around both <xb:extension> elements in localInfo.xsdconfig file, then at a prompt in the working directory where you extracted the files from the example archive, type the following line.
scomp -out localinfo_XmlBeans.jar localInfo.xsd localInfo.xsdconfig
2> Compile extension interface, and handler class using localinfo_XmlBeans.jar, and xbean.jar.
SET CLASSPATH=%CLASSPATH%;localinfo_XmlBeans.jar;.;c:\xmlbeans-1.0.3\lib\xbean.jar
javac -d . weatherExtension.java
javac -d . weatherExtensionHandler.java
3> Remove xml comment around <xb:extension> element of interface extension feature in localInfo.xsdconfig file. Then run scomp again with localInfo.xsd and localInfo.xsdconfig files, make sure that compiled interface extension classes are on the classpath.
scomp -out localinfo_XmlBeans.jar localInfo.xsd localInfo.xsdconfig
Compile PrePostSet handler class,
javac -d . MapPrePostSetHandler.java
4> Now remove xml comment around <xb:extension> element of PrePost extension feature in localInfo.xsdconfig file. Then run scomp again with localInfo.xsd and localInfo.xsdconfig files, make sure that compiled PrePost extension class is on the classpath.
scomp -out localinfo_XmlBeans.jar localInfo.xsd localInfo.xsdconfig
We are ready to compile, and run our XMLBeans based client application prePostClient.java,
javac prePostClient.java
java prePostClient localInfo_68154.xml
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?