XMLBeans parsing XML file full process +altova XMLSpy hack

Source: Internet
Author: User

XMLBeans parsing xml Detailed description of many, the official also has a lot of reference, not much nonsense, the main process is as follows:
</pre><p>1. Download Xmlbean file <a target=_blank href= "http://download.csdn.net/detail/q119909033/8813173" > official or Direct click </a> </p><p>2. Generated according to XML <span style= "Font-family:monaco, ' Dejavu Sans mono ', ' bitstream Vera Sans Mono ', Consolas, ' Courier New ', monospace; line-height:18px; Background-color:rgb (250,250,250) ">schema (<span style=" Font-family:monaco, ' Dejavu Sans Mono ', ' Bitstream Vera Sans Mono ', Consolas, ' Courier New ', monospace; line-height:18px; Background-color:rgb (250,250,250) ">xml file structure and element constraint file </span>), can be generated using tools Altova XMLSpy. <a Target=_blank href= "http://download.csdn.net/detail/q119909033/8813173" > Cracked version point I .</a></span></p><p> <span style= "Font-family:monaco, ' Dejavu Sans mono ', ' bitstream Vera Sans Mono ', Consolas, ' Courier New ', monospace; line-height:18px; Background-color:rgb (250,250,250) ">3. Use the spy to open the XML, select <span style=" Color:rgb (51,51,51); font-family:arial; font-size:14px; Line-height:26px ">dtd/schema->generAte Dtd/schema-><span style= "Color:rgb (51,51,51); font-family:arial; font-size:14px; line-height:26px ">w3c schema-> input name, get mro.xsd file .</span></span></span></p><p> <span style= "Font-family:monaco, ' Dejavu Sans mono ', ' bitstream Vera Sans Mono ', Consolas, ' Courier New ', monospace; line-height:18px; Background-color:rgb (250,250,250) "><span style=" Color:rgb (51,51,51); font-family:arial; font-size:14px; line-height:26px "><span style=" Color:rgb (51,51,51); font-family:arial; font-size:14px; Line-height:26px ">4. Write </span></span></span><span style= "Color:rgb (51,51,51); font-size:14px; line-height:26px; font-family:arial; Background-color:rgb (250,250,250) ">measure</span><span style=" Color:rgb (51,51,51); font-size:14px; line-height:26px; font-family:arial; Background-color:rgb (250,250,250) ">.xsdconfig file. The main role is provided to Xmlbean generation naming using .</span></p><p>< Span style= "Font-family:monaco, ' Dejavu Sans Mono ', 'Bitstream Vera Sans Mono ', Consolas, ' Courier New ', monospace; line-height:18px; Background-color:rgb (250,250,250) "><span style=" Color:rgb (51,51,51); font-family:arial; font-size:14px; line-height:26px "><span style=" Color:rgb (51,51,51); font-family:arial; font-size:14px; line-height:26px "></span></span></span></p><pre name=" code "class=" HTML ">< Span style= "font-family:arial; Background-color:rgb (250, 250, 250); " ></span><pre name= "code" class= "HTML" ><xb:config xmlns:xb= "http://xml.apache.org/xmlbeans/2004/ 02/xbean/config "> <xb:namespace> <xb:package>measure.xmlbean</xb:package> </xb:namespace ></xb:config>

4. Copy mro.xsd, original XML file, mewasure.xsdconfig file to Xmlbean\bin directory. Remember to configure the JAVAJDK environment variable

5. Execute scomp-out measurexmlbean.jar mro.xsdmewasure. Xsdconfig6. Copy the build jar file to the project , eclipse references the jar.

6.java Use the following methods

try {file xmlfile = new File (path); Bulkpmmrdatafiledocument doc = BulkPmMrDataFileDocument.Factory.parse (xmlfile); Fileheader customers = Doc.getbulkpmmrdatafile (). GetFileHeader (); eNodeB ENB = Doc.getbulkpmmrdatafile (). Getenodeb (); measurement[] measurement = Enb.getmeasurementarray (); for (int i = 0; i < measurement.length; i++) {Measurement custome r = measurement[i];p rintln ("ID:" + i);p rintln ("GETSMR ID:" + CUSTOMER.GETSMR ());p rintln ("Getobjectarray Name:" + Customer.getobjectarray () [0].getid ());}} catch (Exception ex) {ex.printstacktrace ();}


To this end has been introduced to complete.


About spy hack simply say:

1. Screening verification. C:\WINDOWS\system32\drivers\etc\hosts added.
127.0.0.1 altova.com #XMLspy
127.0.0.1 www.altova.com #XMLspy
127.0.0.1 link.altova.com #XMLspy
2. Install, copy patch to the installation directory. Click Apply Patch
3. Start the registration, the registration code is as follows
Name:www.shijeiweb.cn
Company:shijeiweb
Key-code:pm92jw3-hjmta8c-p2h3c53-579ct11-pccyt91-x8d0lm1-pwy8u42

XMLBeans parsing XML file full process +altova XMLSpy hack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.