Java Doc for XMLParser.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » framework » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » Rimfaxe Web Server » org.apache.xerces.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.framework.XMLParser

All known Subclasses:   org.apache.xerces.parsers.DOMParser,  org.apache.xerces.parsers.SAXParser,
XMLParser
abstract public class XMLParser implements XMLErrorReporter,XMLDocumentHandler.DTDHandler(Code)
This is the base class of all standard parsers.
version:
   $Id: XMLParser.java,v 1.33.2.5 2001/11/13 20:48:14 neilg Exp $


Field Summary
final protected static  StringSAX2_FEATURES_PREFIX
     SAX2 features prefix (http://xml.org/sax/features/).
final protected static  StringSAX2_PROPERTIES_PREFIX
     SAX2 properties prefix (http://xml.org/sax/properties/).
final protected static  StringXERCES_FEATURES_PREFIX
     Xerces features prefix (http://apache.org/xml/features/).
final protected static  StringXERCES_PROPERTIES_PREFIX
     Xerces properties prefix (http://apache.org/xml/properties/).
protected  DefaultEntityHandlerfEntityHandler
    
protected  XMLErrorReporterfErrorReporter
    
protected  GrammarResolverfGrammarResolver
    
protected  booleanfParseInProgress
    
protected  XMLDocumentScannerfScanner
    
protected  StringPoolfStringPool
    
protected  XMLValidatorfValidator
    

Constructor Summary
protected  XMLParser()
    
protected  XMLParser(StringPool stringPool)
    

Method Summary
public  voidaddRecognizer(XMLDeclRecognizer recognizer)
     Adds a recognizer.
protected  booleangetAllowJavaEncodings()
     Returns true if Java encoding names are allowed in the XML document.
protected  booleangetContinueAfterFatalError()
     Returns true if the parser continues after a fatal error.
public  EntityResolvergetEntityResolver()
     Return the current entity resolver.
public  ErrorHandlergetErrorHandler()
     Return the current error handler.
protected  booleangetExternalGeneralEntities()
     Note: This feature is always true.

Returns true if external general entities are expanded.

protected  booleangetExternalParameterEntities()
     Note: This feature is always true.

Returns true if external parameter entities are expanded.

public  booleangetFeature(String featureId)
     Query the state of a feature. Query the current state of any feature in a SAX2 parser.
public  String[]getFeaturesRecognized()
     Returns a list of features that this parser recognizes.
protected  booleangetLoadDTDGrammar()
     Returns true if load DTD grammar is turned on in the XMLValiator.
protected  booleangetLoadExternalDTD()
     Returns true if loading of the external DTD is on.
final public  LocatorgetLocator()
    
protected  booleangetNamespaces()
     Returns true if the parser preprocesses namespaces.
protected  booleangetNormalizeContents()
    
public  String[]getPropertiesRecognized()
     Returns a list of properties that this parser recognizes.
public  ObjectgetProperty(String propertyId)
     Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.
Parameters:
  propertyId - The unique identifier (URI) of the propertybeing set.
protected  booleangetValidation()
     Returns true if validation is turned on.
protected  booleangetValidationDynamic()
     Returns true if validation is based on whether a document contains a grammar.
protected  booleangetValidationSchema()
     Returns true if Schema support is turned on.
protected  booleangetValidationSchemaFullChecking()
     Returns true if Schema support is turned on.
protected  booleangetValidationWarnOnDuplicateAttdef()
     Returns true if an error is emitted when an attribute is redefined in the grammar.
protected  booleangetValidationWarnOnUndeclaredElemdef()
     Returns true if the parser emits an error when an undeclared element is referenced in the grammar.
protected  StringgetXMLString()
    
final public  LocalegetfLocale()
    
final public  XMLMessageProvidergetfgDatatypeMessages()
    
final public  XMLMessageProvidergetfgImplementationMessages()
    
final public  XMLMessageProvidergetfgSchemaMessages()
    
final public  XMLMessageProvidergetfgXMLMessages()
    
protected  voidinitHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)
     Set char data processing preference and handlers.
public  booleanisFeatureRecognized(String featureId)
     Returns true if the specified feature is recognized.
public  booleanisPropertyRecognized(String propertyId)
     Returns true if the specified property is recognized.
public  voidparse(InputSource source)
     Parses the specified input source.
public  voidparse(String systemId)
     Parses the input source specified by the given system identifier.
public  booleanparseSome()
     Application-driven parsing.
public  booleanparseSomeSetup(InputSource source)
     Setup for application-driven parsing.
public  voidreportError(Locator locator, String errorDomain, int majorCode, int minorCode, Object args, int errorType)
     Report an error.
public  voidreset()
     Reset parser instance so that it can be reused.
protected  voidresetOrCopy()
    
protected  voidsetAllowJavaEncodings(boolean allow)
     Allows the use of Java encoding names in the XMLDecl and TextDecl lines in an XML document.
protected  voidsetContinueAfterFatalError(boolean continueAfterFatalError)
     Allows the parser to continue after a fatal error.
public  voidsetEntityResolver(EntityResolver resolver)
     Sets the resolver used to resolve external entities.
public  voidsetErrorHandler(ErrorHandler handler)
     Sets the error handler.
protected  voidsetExternalGeneralEntities(boolean expand)
     Note: Currently, this parser always expands external general entities. Setting this feature to false will throw a SAXNotSupportedException.
protected  voidsetExternalNoNamespaceSchemaLocation(Object value)
     Allows the user to set external XML Schema with no target Namespace.
protected  voidsetExternalParameterEntities(boolean expand)
     Note: Currently, this parser always expands external parameter entities. Setting this feature to false will throw a SAXNotSupportedException.
protected  voidsetExternalSchemaLocation(Object value)
     Allows the user to set a list of external XML Schemas (ex."http://example.com schema.xsd") to be used by the parser.
public  voidsetFeature(String featureId, boolean state)
     Set the state of a feature. Set the state of any feature in a SAX2 parser.
protected  voidsetLoadDTDGrammar(boolean loadDTDGrammar)
     Allows the parser to have the choice to load DTD grammar when validation is off.
protected  voidsetLoadExternalDTD(boolean loadExternalDTD)
     Allows the parser to have the choice to load the external DTD when validation is off.
public  voidsetLocale(Locale locale)
     Set the locale to use for messages.
protected  voidsetNamespaces(boolean process)
     Sets whether the parser preprocesses namespaces.
protected  voidsetNormalizeAttributeValues(boolean normalize)
    
protected  voidsetNormalizeContents(boolean normalize)
     Normalization of element content is controlled by this feature.
public  voidsetProperty(String propertyId, Object value)
     Set the value of a property. Set the value of any property in a SAX2 parser.
public  voidsetReaderFactory(XMLEntityReaderFactory readerFactory)
     Set the reader factory.
protected  voidsetValidation(boolean validate)
     Sets whether the parser validates.
protected  voidsetValidationDynamic(boolean dynamic)
     Allows the parser to validate a document only when it contains a grammar.
protected  voidsetValidationSchema(boolean schema)
     Allows the user to turn Schema support on/off.
protected  voidsetValidationSchemaFullChecking(boolean schemaFullChecking)
     Allows the user to turn full Schema constraint checking on/off.
protected  voidsetValidationWarnOnDuplicateAttdef(boolean warn)
     Sets whether an error is emitted when an attribute is redefined in the grammar.
protected  voidsetValidationWarnOnUndeclaredElemdef(boolean warn)
     Sets whether the parser emits an error when an element's content model references an element by name that is not declared in the grammar.

Field Detail
SAX2_FEATURES_PREFIX
final protected static String SAX2_FEATURES_PREFIX(Code)
SAX2 features prefix (http://xml.org/sax/features/).



SAX2_PROPERTIES_PREFIX
final protected static String SAX2_PROPERTIES_PREFIX(Code)
SAX2 properties prefix (http://xml.org/sax/properties/).



XERCES_FEATURES_PREFIX
final protected static String XERCES_FEATURES_PREFIX(Code)
Xerces features prefix (http://apache.org/xml/features/).



XERCES_PROPERTIES_PREFIX
final protected static String XERCES_PROPERTIES_PREFIX(Code)
Xerces properties prefix (http://apache.org/xml/properties/).



fEntityHandler
protected DefaultEntityHandler fEntityHandler(Code)



fErrorReporter
protected XMLErrorReporter fErrorReporter(Code)



fGrammarResolver
protected GrammarResolver fGrammarResolver(Code)



fParseInProgress
protected boolean fParseInProgress(Code)



fScanner
protected XMLDocumentScanner fScanner(Code)



fStringPool
protected StringPool fStringPool(Code)



fValidator
protected XMLValidator fValidator(Code)




Constructor Detail
XMLParser
protected XMLParser()(Code)
Constructor



XMLParser
protected XMLParser(StringPool stringPool)(Code)




Method Detail
addRecognizer
public void addRecognizer(XMLDeclRecognizer recognizer)(Code)
Adds a recognizer.
Parameters:
  recognizer - The XML recognizer to add.



getAllowJavaEncodings
protected boolean getAllowJavaEncodings() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if Java encoding names are allowed in the XML document.
See Also:   XMLParser.setAllowJavaEncodings



getContinueAfterFatalError
protected boolean getContinueAfterFatalError() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if the parser continues after a fatal error.
See Also:   XMLParser.setContinueAfterFatalError



getEntityResolver
public EntityResolver getEntityResolver()(Code)
Return the current entity resolver. The current entity resolver, or null if nonehas been registered.
See Also:   XMLParser.setEntityResolver



getErrorHandler
public ErrorHandler getErrorHandler()(Code)
Return the current error handler. The current error handler, or null if nonehas been registered.
See Also:   XMLParser.setErrorHandler



getExternalGeneralEntities
protected boolean getExternalGeneralEntities() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Note: This feature is always true.

Returns true if external general entities are expanded.
See Also:   XMLParser.setExternalGeneralEntities




getExternalParameterEntities
protected boolean getExternalParameterEntities() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Note: This feature is always true.

Returns true if external parameter entities are expanded.
See Also:   XMLParser.setExternalParameterEntities




getFeature
public boolean getFeature(String featureId) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.
Parameters:
  featureId - The unique identifier (URI) of the featurebeing set. The current state of the feature.
exception:
  org.xml.sax.SAXNotRecognizedException - If therequested feature is not known.
exception:
  org.xml.sax.SAXException - If there is any otherproblem fulfilling the request.



getFeaturesRecognized
public String[] getFeaturesRecognized()(Code)
Returns a list of features that this parser recognizes. This method will never return null; if no features are recognized, this method will return a zero length array.
See Also:   XMLParser.isFeatureRecognized
See Also:   XMLParser.setFeature
See Also:   XMLParser.getFeature



getLoadDTDGrammar
protected boolean getLoadDTDGrammar() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if load DTD grammar is turned on in the XMLValiator.
See Also:   XMLParser.setLoadDTDGrammar



getLoadExternalDTD
protected boolean getLoadExternalDTD() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if loading of the external DTD is on.
See Also:   XMLParser.setLoadExternalDTD



getLocator
final public Locator getLocator()(Code)
return the locator being used by the parser the parser's active locator



getNamespaces
protected boolean getNamespaces() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if the parser preprocesses namespaces.
See Also:   XMLParser.setNamespaces



getNormalizeContents
protected boolean getNormalizeContents()(Code)



getPropertiesRecognized
public String[] getPropertiesRecognized()(Code)
Returns a list of properties that this parser recognizes. This method will never return null; if no properties are recognized, this method will return a zero length array.
See Also:   XMLParser.isPropertyRecognized
See Also:   XMLParser.setProperty
See Also:   XMLParser.getProperty



getProperty
public Object getProperty(String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.
Parameters:
  propertyId - The unique identifier (URI) of the propertybeing set. The current value of the property.
exception:
  org.xml.sax.SAXNotRecognizedException - If therequested property is not known.
exception:
  org.xml.sax.SAXException - If there is any otherproblem fulfilling the request.
See Also:   org.xml.sax.XMLReader.getProperty



getValidation
protected boolean getValidation() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if validation is turned on.
See Also:   XMLParser.setValidation



getValidationDynamic
protected boolean getValidationDynamic() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if validation is based on whether a document contains a grammar.
See Also:   XMLParser.setValidationDynamic



getValidationSchema
protected boolean getValidationSchema() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if Schema support is turned on.
See Also:   XMLParser.setValidationSchema



getValidationSchemaFullChecking
protected boolean getValidationSchemaFullChecking() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if Schema support is turned on.
See Also:   XMLParser.setValidationSchemaFullChecking



getValidationWarnOnDuplicateAttdef
protected boolean getValidationWarnOnDuplicateAttdef() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if an error is emitted when an attribute is redefined in the grammar.
See Also:   XMLParser.setValidationWarnOnDuplicateAttdef



getValidationWarnOnUndeclaredElemdef
protected boolean getValidationWarnOnUndeclaredElemdef() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns true if the parser emits an error when an undeclared element is referenced in the grammar.
See Also:   XMLParser.setValidationWarnOnUndeclaredElemdef



getXMLString
protected String getXMLString() throws SAXNotRecognizedException, SAXNotSupportedException(Code)
This method is the equivalent to the property:
 http://xml.org/sax/properties/xml-string
 

See Also:   XMLParser.getProperty



getfLocale
final public Locale getfLocale()(Code)
return the locale the locale



getfgDatatypeMessages
final public XMLMessageProvider getfgDatatypeMessages()(Code)
return the Datatypes Messages object the parser's datatypes messages



getfgImplementationMessages
final public XMLMessageProvider getfgImplementationMessages()(Code)
return the Implementation Messages object the parser's implementation messages



getfgSchemaMessages
final public XMLMessageProvider getfgSchemaMessages()(Code)
return the Schema Messages object the parser's schema messages



getfgXMLMessages
final public XMLMessageProvider getfgXMLMessages()(Code)
return the XML Messages object the parser's messages object



initHandlers
protected void initHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)(Code)
Set char data processing preference and handlers.



isFeatureRecognized
public boolean isFeatureRecognized(String featureId)(Code)
Returns true if the specified feature is recognized.
See Also:   XMLParser.getFeaturesRecognized
See Also:   XMLParser.setFeature
See Also:   XMLParser.getFeature



isPropertyRecognized
public boolean isPropertyRecognized(String propertyId)(Code)
Returns true if the specified property is recognized.
See Also:   XMLParser.getPropertiesRecognized
See Also:   XMLParser.setProperty
See Also:   XMLParser.getProperty



parse
public void parse(InputSource source) throws SAXException, IOException(Code)
Parses the specified input source.
Parameters:
  source - The input source.
exception:
  org.xml.sax.SAXException - Throws exception on SAX error.
exception:
  java.io.IOException - Throws exception on i/o error.



parse
public void parse(String systemId) throws SAXException, IOException(Code)
Parses the input source specified by the given system identifier.

This method is almost equivalent to the following:

 parse(new InputSource(systemId));
 
The only difference is that this method will attempt to close the stream that was opened.
Parameters:
  source - The input source.
exception:
  org.xml.sax.SAXException - Throws exception on SAX error.
exception:
  java.io.IOException - Throws exception on i/o error.



parseSome
public boolean parseSome() throws Exception(Code)
Application-driven parsing.
See Also:   XMLParser.parseSomeSetup



parseSomeSetup
public boolean parseSomeSetup(InputSource source) throws Exception(Code)
Setup for application-driven parsing.
Parameters:
  source - the input source to be parsed.
See Also:   XMLParser.parseSome



reportError
public void reportError(Locator locator, String errorDomain, int majorCode, int minorCode, Object args, int errorType) throws Exception(Code)
Report an error.
Parameters:
  locator - Location of error.
Parameters:
  errorDomain - The error domain.
Parameters:
  majorCode - The major code of the error.
Parameters:
  minorCode - The minor code of the error.
Parameters:
  args - Arguments for replacement text.
Parameters:
  errorType - The type of the error.
exception:
  Exception - Thrown on error.
See Also:   XMLErrorReporter.ERRORTYPE_WARNING
See Also:   XMLErrorReporter.ERRORTYPE_FATAL_ERROR



reset
public void reset() throws Exception(Code)
Reset parser instance so that it can be reused.



resetOrCopy
protected void resetOrCopy() throws Exception(Code)
Reset or copy parser Allows parser instance reuse



setAllowJavaEncodings
protected void setAllowJavaEncodings(boolean allow) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the use of Java encoding names in the XMLDecl and TextDecl lines in an XML document.

This method is the equivalent to the feature:

 http://apache.org/xml/features/allow-java-encodings
 

Parameters:
  allow - True to allow Java encoding names; false to disallow.
See Also:   XMLParser.getAllowJavaEncodings
See Also:   XMLParser.setFeature



setContinueAfterFatalError
protected void setContinueAfterFatalError(boolean continueAfterFatalError) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the parser to continue after a fatal error. Normally, a fatal error would stop the parse.

This method is the equivalent to the feature:

 http://apache.org/xml/features/continue-after-fatal-error
 

Parameters:
  continueAfterFatalError - True to continue; false to stop onfatal error.
See Also:   XMLParser.getContinueAfterFatalError
See Also:   XMLParser.setFeature



setEntityResolver
public void setEntityResolver(EntityResolver resolver)(Code)
Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.
Parameters:
  resolver - The new entity resolver. Passing a null value willuninstall the currently installed resolver.



setErrorHandler
public void setErrorHandler(ErrorHandler handler)(Code)
Sets the error handler.
Parameters:
  handler - The new error handler.



setExternalGeneralEntities
protected void setExternalGeneralEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Note: Currently, this parser always expands external general entities. Setting this feature to false will throw a SAXNotSupportedException.

Sets whether external general entities are expanded.

This method is the equivalent to the feature:

 http://xml.org/sax/features/external-general-entities
 

Parameters:
  expand - True to expand external general entities; falseto not expand.
See Also:   XMLParser.getExternalGeneralEntities
See Also:   XMLParser.setFeature



setExternalNoNamespaceSchemaLocation
protected void setExternalNoNamespaceSchemaLocation(Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the user to set external XML Schema with no target Namespace. This value overwrites the value on the _noNamespaceSchemaLocation_. See XML Schema REC: http://www.w3.org/TR/xmlschema-1/#schema-loc

This method is equivalent to the property:

http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation

Parameters:
  value - An XML Schema file name
exception:
  SAXNotRecognizedException -
exception:
  SAXNotSupportedException -



setExternalParameterEntities
protected void setExternalParameterEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Note: Currently, this parser always expands external parameter entities. Setting this feature to false will throw a SAXNotSupportedException.

Sets whether external parameter entities are expanded.

This method is the equivalent to the feature:

 http://xml.org/sax/features/external-parameter-entities
 

Parameters:
  expand - True to expand external parameter entities; falseto not expand.
See Also:   XMLParser.getExternalParameterEntities
See Also:   XMLParser.setFeature



setExternalSchemaLocation
protected void setExternalSchemaLocation(Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the user to set a list of external XML Schemas (ex."http://example.com schema.xsd") to be used by the parser. If two schemas with the same targetNamespace appear in both the list and a document, the one from the list will be picked up. See XML Schema REC: http://www.w3.org/TR/xmlschema-1/#schema-loc

This method is equivalent to the property:

http://apache.org/xml/properties/schema/external-schemaLocation

Parameters:
  value - The list of schemas.
exception:
  SAXNotRecognizedException -
exception:
  SAXNotSupportedException -



setFeature
public void setFeature(String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Set the state of a feature. Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.
Parameters:
  featureId - The unique identifier (URI) of the feature.
Parameters:
  state - The requested state of the feature (true or false).
exception:
  org.xml.sax.SAXNotRecognizedException - If therequested feature is not known.
exception:
  org.xml.sax.SAXNotSupportedException - If therequested feature is known, but the requestedstate is not supported.
exception:
  org.xml.sax.SAXException - If there is any otherproblem fulfilling the request.



setLoadDTDGrammar
protected void setLoadDTDGrammar(boolean loadDTDGrammar) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the parser to have the choice to load DTD grammar when validation is off.

This method is the equivalent to the feature:

 http://apache.org/xml/features/nonvalidating/load-dtd-grammar
 

Parameters:
  loadDTDGrammar - True to turn on the feature; false toturn off the feature.
See Also:   XMLParser.getLoadDTDGrammar
See Also:   XMLParser.setFeature



setLoadExternalDTD
protected void setLoadExternalDTD(boolean loadExternalDTD) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the parser to have the choice to load the external DTD when validation is off.

This method is the equivalent to the feature:

 http://apache.org/xml/features/nonvalidating/load-external-dtd
 

Parameters:
  loadExternalDTD - True to turn on the feature; false toturn off the feature.
See Also:   XMLParser.getLoadExternalDTD
See Also:   XMLParser.setFeature



setLocale
public void setLocale(Locale locale) throws SAXException(Code)
Set the locale to use for messages.
Parameters:
  locale - The locale object to use for localization of messages.
exception:
  SAXException - An exception thrown if the parser does notsupport the specified locale.
See Also:   org.xml.sax.Parser



setNamespaces
protected void setNamespaces(boolean process) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Sets whether the parser preprocesses namespaces.

This method is the equivalent to the feature:

 http://xml.org/sax/features/namespaces
 

Parameters:
  process - True to process namespaces; false to not process.
See Also:   XMLParser.getNamespaces
See Also:   XMLParser.setFeature



setNormalizeAttributeValues
protected void setNormalizeAttributeValues(boolean normalize)(Code)



setNormalizeContents
protected void setNormalizeContents(boolean normalize)(Code)
Normalization of element content is controlled by this feature. If this feature is set to true, DOM and SAX APIs will expose element content that is normalized according to XML Schema REC. Otherwise, element content will be exposed as required by the infoset.
Parameters:
  normalize -



setProperty
public void setProperty(String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Set the value of a property. Set the value of any property in a SAX2 parser. The parser might not recognize the property, and if it does recognize it, it might not support the requested value.
Parameters:
  propertyId - The unique identifier (URI) of the propertybeing set.
Parameters:
  Object - The value to which the property is being set.
exception:
  org.xml.sax.SAXNotRecognizedException - If therequested property is not known.
exception:
  org.xml.sax.SAXNotSupportedException - If therequested property is known, but the requestedvalue is not supported.
exception:
  org.xml.sax.SAXException - If there is any otherproblem fulfilling the request.



setReaderFactory
public void setReaderFactory(XMLEntityReaderFactory readerFactory)(Code)
Set the reader factory.



setValidation
protected void setValidation(boolean validate) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Sets whether the parser validates.

This method is the equivalent to the feature:

 http://xml.org/sax/features/validation
 

Parameters:
  validate - True to validate; false to not validate.
See Also:   XMLParser.getValidation
See Also:   XMLParser.setFeature



setValidationDynamic
protected void setValidationDynamic(boolean dynamic) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the parser to validate a document only when it contains a grammar. Validation is turned on/off based on each document instance, automatically.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/dynamic
 

Parameters:
  dynamic - True to dynamically validate documents; false tovalidate based on the validation feature.
See Also:   XMLParser.getValidationDynamic
See Also:   XMLParser.setFeature



setValidationSchema
protected void setValidationSchema(boolean schema) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the user to turn Schema support on/off.

This method is equivalent to the feature:

 http://apache.org/xml/features/validation/schema
 

Parameters:
  schema - True to turn on Schema support; false to turn it off.
See Also:   XMLParser.getValidationSchema
See Also:   XMLParser.setFeature



setValidationSchemaFullChecking
protected void setValidationSchemaFullChecking(boolean schemaFullChecking) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Allows the user to turn full Schema constraint checking on/off. Only takes effect if Schema validation is enabled. If this feature is off, partial constraint checking is done.

This method is equivalent to the feature:

 http://apache.org/xml/features/validation/schema-full-checking
 

Parameters:
  schemaFullChecking - True to turn on full schema constraint checking.
See Also:   XMLParser.getValidationSchemaFullChecking
See Also:   XMLParser.setFeature



setValidationWarnOnDuplicateAttdef
protected void setValidationWarnOnDuplicateAttdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Sets whether an error is emitted when an attribute is redefined in the grammar.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/warn-on-duplicate-attdef
 

Parameters:
  warn - True to warn; false to not warn.
See Also:   XMLParser.getValidationWarnOnDuplicateAttdef
See Also:   XMLParser.setFeature



setValidationWarnOnUndeclaredElemdef
protected void setValidationWarnOnUndeclaredElemdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Sets whether the parser emits an error when an element's content model references an element by name that is not declared in the grammar.

This method is the equivalent to the feature:

 http://apache.org/xml/features/validation/warn-on-undeclared-elemdef
 

Parameters:
  warn - True to warn; false to not warn.
See Also:   XMLParser.getValidationWarnOnUndeclaredElemdef
See Also:   XMLParser.setFeature



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.