You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-cvs@xml.apache.org by ce...@apache.org on 2004/07/02 20:58:31 UTC

cvs commit: xml-xmlbeans/v2/src/xmlpublic/org/apache/xmlbeans XmlOptions.java

cezar       2004/07/02 11:58:31

  Modified:    v2/src/xmlpublic/org/apache/xmlbeans XmlOptions.java
  Log:
  Adding a new option for using a user specified XMLReader.
  
  Revision  Changes    Path
  1.9       +15 -0     xml-xmlbeans/v2/src/xmlpublic/org/apache/xmlbeans/XmlOptions.java
  
  Index: XmlOptions.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlpublic/org/apache/xmlbeans/XmlOptions.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XmlOptions.java	31 Mar 2004 00:09:37 -0000	1.8
  +++ XmlOptions.java	2 Jul 2004 18:58:31 -0000	1.9
  @@ -16,6 +16,7 @@
   package org.apache.xmlbeans;
   
   import org.xml.sax.EntityResolver;
  +import org.xml.sax.XMLReader;
   
   import java.util.HashMap;
   import java.util.Map;
  @@ -435,6 +436,18 @@
       }
   
       /**
  +     * By default, XmlBeans uses an internal Piccolo parser,
  +     * other parsers can be used by providing an XMLReader.
  +     * For using the default JDK's SAX parser use:
  +     * xmlOptions.setLoadUseXMLReader( SAXParserFactory.newInstance().newSAXParser().getXMLReader() );
  +     *
  +     * @see XmlObject.Factory#parse(java.io.File, XmlOptions)
  +     */
  +    public XmlOptions setLoadUseXMLReader (XMLReader xmlReader) {
  +        return set( LOAD_USE_XMLREADER, xmlReader );
  +    }
  +
  +    /**
        * If this option is set, then schema validation will be performed during
        * unmarshalling.  Errors will be added to error collection supplied
        * in this options instance
  @@ -655,6 +668,8 @@
       public static final String LOAD_MESSAGE_DIGEST             =  "LOAD_MESSAGE_DIGEST";
       /** @exclude */
       public static final String LOAD_USE_DEFAULT_RESOLVER       =  "LOAD_USE_DEFAULT_RESOLVER";
  +    /** @exclude */
  +    public static final String LOAD_USE_XMLREADER              =  "LOAD_USE_XMLREADER";
   
       /** @exclude */
       public static final String UNMARSHAL_VALIDATE              =  "UNMARSHAL_VALIDATE";
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org