Parsing XML schema java

风格不统一 提交于 2019-12-25 04:59:07

问题


I need to parse XML schema (source can be wsdl file or xsd ) and extract all the complex types and their constituent elements with their types.. I have used JAXB (xjc)but it does not return me a list of all complexTypes . Which alternative (XSOM) should I use? I would prefer some built-in library in jdk6.

`

 <element name="BankLoanProcessRequest">   
   <complexType>
     <sequence>
    <element name="ClientId" type="int"/>
    <element name="LoanAmount" type="double"/>
   </sequence>
  </complexType>
 </element>`

回答1:


you can use JDOM or DOM4j-

here are the link -

http://www.jdom.org/

http://dom4j.sourceforge.net/



来源:https://stackoverflow.com/questions/11408652/parsing-xml-schema-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!