Parser
接口。
public class ParserFactory extends Object
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.
注:这类设计与现在已经Parser
SAX1班工作。SAX2应用程序应该使用XMLReaderFactory
相反。
ParserFactory不是SAX的平台独立的定义的一部分;它是一个额外的方便类专为java XML应用的作家。SAX应用程序可以在这个类中使用静态方法来分配一个SAX解析器在运行时动态的基础上的` org的价值。XML解析器的系统性能。萨克斯,或一个字符串包含类名。
请注意,应用程序仍然需要一个XML解析器实现SAX1。
Modifier and Type | Method and Description |
---|---|
static Parser |
makeParser()
过时的。
使用`组织创建一个新的SAX解析器SAX解析器,XML,系统性能。
|
static Parser |
makeParser(String className)
过时的。
创建一个新的使用类名提供SAX解析器对象。
|
public static Parser makeParser() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NullPointerException, ClassCastException
指定的类必须存在,必须实现Parser
接口。
NullPointerException
-有没有价值的` SAX解析器,XML,系统性能。
ClassNotFoundException
- SAX解析器类没有被发现(检查你的classpath中)。
IllegalAccessException
- SAX解析器类被发现,但您没有权限加载它。
InstantiationException
-发现SAX解析器类不能被实例化。
ClassCastException
- SAX解析器类被实例化,但没有实现org.xml.sax.parser。
makeParser(java.lang.String)
,
Parser
public static Parser makeParser(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException, ClassCastException
指定的类必须存在,必须实现Parser
接口。
className
-字符串SAX解析器类的名称。
ClassNotFoundException
- SAX解析器类没有被发现(检查你的classpath中)。
IllegalAccessException
- SAX解析器类被发现,但您没有权限加载它。
InstantiationException
-发现SAX解析器类不能被实例化。
ClassCastException
- SAX解析器类被实例化,但没有实现org.xml.sax.parser。
makeParser()
,
Parser
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.