欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
一個(gè)使用自定義命名空間的Schema文件,xml文件和castor生成的java代碼的例子
一個(gè)使用自定義命名空間的Schema文件,xml文件和castor生成的java代碼例子。
平時(shí)只使用到了最簡(jiǎn)單的xml數據綁定,現在測試一個(gè)稍微復雜點(diǎn)的例子。
關(guān)于xml Schema,有篇好文章:http://gis.pku.edu.cn/Resources/TR/XML_Schema.doc
通過(guò)xml數據綁定可以省下很多寫(xiě)Javabean代碼的時(shí)間。

一個(gè)使用自定義命名空間的Schema文件,xml文件和castor生成的java代碼例子。
平時(shí)只使用到了最簡(jiǎn)單的xml數據綁定,現在測試一個(gè)稍微復雜點(diǎn)的例子。
 
關(guān)于xml Schema,有篇好文章:http://gis.pku.edu.cn/Resources/TR/XML_Schema.doc
 
xsd文件:
 
 
<?xml version="1.0" encoding="GB2312"?>
<!-- edited by lizongbo -->
<xs:schema xmlns:xs=" <xs:element name="userinfo">
  <xs:annotation>
   <xs:documentation>Comment describing your root element</xs:documentation>
  </xs:annotation>
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="userinfo:loginifo"/>
    <xs:element ref="userinfo:mailinfo"/>
   </xs:sequence>
  </xs:complexType>
 </xs:element>
 <xs:element name="loginifo">
  <xs:annotation>
   <xs:documentation>登陸信息</xs:documentation>
  </xs:annotation>
  <xs:complexType>
   <xs:sequence>
    <xs:element name="username" type="xs:string" default="lizongbo">
     <xs:annotation>
      <xs:documentation>用戶(hù)名</xs:documentation>
     </xs:annotation>
    </xs:element>
    <xs:element name="userpass" type="xs:string" default="lizongbopass">
     <xs:annotation>
      <xs:documentation>密碼</xs:documentation>
     </xs:annotation>
    </xs:element>
   </xs:sequence>
  </xs:complexType>
 </xs:element>
 <xs:element name="mailinfo">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="addr" type="xs:string" default="lizongbo @ gamil.com">
     <xs:annotation>
      <xs:documentation xml:lang="zh">郵件地址</xs:documentation>
      <xs:documentation xml:lang="en">Email Address</xs:documentation>
     </xs:annotation>
    </xs:element>
    <xs:element name="person" type="xs:string" default="lzb">
     <xs:annotation>
      <xs:documentation>收件人名字</xs:documentation>
     </xs:annotation>
    </xs:element>
   </xs:sequence>
  </xs:complexType>
 </xs:element>
</xs:schema>
 
package com.lizongbo.;
 
  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/
 
import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;
 
/**
 * Comment describing your root element
 *
 * @version $Revision$ $Date$
 */
public class Userinfo implements java.io.Serializable {
 

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/
 
    /**
     * 登陸信息
     */
    private com.lizongbo..Loginifo _loginifo;
 
    /**
     * Field _mailinfo
     */
    private com.lizongbo..Mailinfo _mailinfo;
 

      //----------------/
     //- Constructors -/
    //----------------/
 
    public Userinfo() {
        super();
    } //-- com.lizongbo..Userinfo()
 

      //-----------/
     //- Methods -/
    //-----------/
 
    /**
     * Returns the value of field ‘loginifo‘. The field ‘loginifo‘
     * has the following description: 登陸信息
     *
     * @return the value of field ‘loginifo‘.
     */
    public com.lizongbo..Loginifo getLoginifo()
    {
        return this._loginifo;
    } //-- com.lizongbo..Loginifo getLoginifo()
 
    /**
     * Returns the value of field ‘mailinfo‘.
     *
     * @return the value of field ‘mailinfo‘.
     */
    public com.lizongbo..Mailinfo getMailinfo()
    {
        return this._mailinfo;
    } //-- com.lizongbo..Mailinfo getMailinfo()
 
    /**
     * Method isValid
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid()
 
    /**
     * Method marshal
     *
     * @param out
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
       
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer)
 
    /**
     * Method marshal
     *
     * @param handler
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
       
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler)
 
    /**
     * Sets the value of field ‘loginifo‘. The field ‘loginifo‘ has
     * the following description: 登陸信息
     *
     * @param loginifo the value of field ‘loginifo‘.
     */
    public void setLoginifo(com.lizongbo..Loginifo loginifo)
    {
        this._loginifo = loginifo;
    } //-- void setLoginifo(com.lizongbo..Loginifo)
 
    /**
     * Sets the value of field ‘mailinfo‘.
     *
     * @param mailinfo the value of field ‘mailinfo‘.
     */
    public void setMailinfo(com.lizongbo..Mailinfo mailinfo)
    {
        this._mailinfo = mailinfo;
    } //-- void setMailinfo(com.lizongbo..Mailinfo)
 
    /**
     * Method unmarshal
     *
     * @param reader
     */
    public static java.lang.Object unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (com.lizongbo..Userinfo) Unmarshaller.unmarshal(com.lizongbo..Userinfo.class, reader);
    } //-- java.lang.Object unmarshal(java.io.Reader)
 
    /**
     * Method validate
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate()
 
}
 
 
--------------------------------------------------
/*
 * This class was automatically generated with
 * <a href="castor/‘>http://www.castor.org">Castor 0.9.5.3</a>, using an XML
 * Schema.
 * $Id$
 */
 
package com.lizongbo.;
 
  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/
 
import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;
 
/**
 * Class Mailinfo.
 *
 * @version $Revision$ $Date$
 */
public class Mailinfo implements java.io.Serializable {
 

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/
 
    /**
     * 郵件地址
     */
    private java.lang.String _addr = "lizongbo @ gamil.com";
 
    /**
     * 收件人名字
     */
    private java.lang.String _person = "lzb";
 

      //----------------/
     //- Constructors -/
    //----------------/
 
    public Mailinfo() {
        super();
        setAddr("lizongbo @ gamil.com");
        setPerson("lzb");
    } //-- com.lizongbo..Mailinfo()
 

      //-----------/
     //- Methods -/
    //-----------/
 
    /**
     * Returns the value of field ‘a(chǎn)ddr‘. The field ‘a(chǎn)ddr‘ has the
     * following description: 郵件地址
     *
     * @return the value of field ‘a(chǎn)ddr‘.
     */
    public java.lang.String getAddr()
    {
        return this._addr;
    } //-- java.lang.String getAddr()
 
    /**
     * Returns the value of field ‘person‘. The field ‘person‘ has
     * the following description: 收件人名字
     *
     * @return the value of field ‘person‘.
     */
    public java.lang.String getPerson()
    {
        return this._person;
    } //-- java.lang.String getPerson()
 
    /**
     * Method isValid
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid()
 
    /**
     * Method marshal
     *
     * @param out
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
       
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer)
 
    /**
     * Method marshal
     *
     * @param handler
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
       
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler)
 
    /**
     * Sets the value of field ‘a(chǎn)ddr‘. The field ‘a(chǎn)ddr‘ has the
     * following description: 郵件地址
     *
     * @param addr the value of field ‘a(chǎn)ddr‘.
     */
    public void setAddr(java.lang.String addr)
    {
        this._addr = addr;
    } //-- void setAddr(java.lang.String)
 
    /**
     * Sets the value of field ‘person‘. The field ‘person‘ has the
     * following description: 收件人名字
     *
     * @param person the value of field ‘person‘.
     */
    public void setPerson(java.lang.String person)
    {
        this._person = person;
    } //-- void setPerson(java.lang.String)
 
    /**
     * Method unmarshal
     *
     * @param reader
     */
    public static java.lang.Object unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (com.lizongbo..Mailinfo) Unmarshaller.unmarshal(com.lizongbo..Mailinfo.class, reader);
    } //-- java.lang.Object unmarshal(java.io.Reader)
 
    /**
     * Method validate
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate()
 
}
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
Android開(kāi)發(fā)之動(dòng)態(tài)生成表格及其邊框
一個(gè)簡(jiǎn)單的XML Schema的例子 [XML/SOAP]
代碼生成器
Java 中的 XML: 數據綁定,第 1 部分:代碼生成方法 — JAXB 及其它
JAXB、JAXP、JAXM、JAX-WS
Tomcat6.0 連接池的配置
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久