jaxb 1.5
因为项目原因,今天研究了 jdk 1.4 + jaxb 解析xml,运行成功 Java Architecture for XML Binding (JAXB): http://www.oracle.com/technetwork/articles/javase/index-140168.html#xmp3 The Jaxb1.5 demo is base on jdk 1.4.2 + jaxb 1.5 + dtd: 1. install the jaxb 1.5,which download from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-jwsdp-419428.html#jwsdp-2.0-oth-JPR 2. generate the java classes base on dtd file. All the command are list in jaxbGen.bat (in Jaxb1.5 folder) 3. test client Jaxbdemo KeyPoint: the dtd description translates into java classes and then we can use these java classes to access the xml file. jaxbGen.bat SET JAVA_HOME=D:DevEnvjdkjdk1.4 %JAXB_HOME%binxjc.bat -dtd -p com.test quote.dtd -d src (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |