public class XmlSaxReader extends Object
Constructor and Description |
---|
XmlSaxReader(SAXParserFactory factory,
InputSource source)
构造
|
Modifier and Type | Method and Description |
---|---|
static XmlSaxReader |
of(InputSource source)
创建XmlSaxReader,使用全局
SAXParserFactory |
static XmlSaxReader |
of(SAXParserFactory factory,
InputSource source)
创建XmlSaxReader
|
void |
read(ContentHandler contentHandler)
读取内容
|
public XmlSaxReader(SAXParserFactory factory, InputSource source)
factory
- SAXParserFactory
source
- XML源,可以是文件、流、路径等public static XmlSaxReader of(InputSource source)
SAXParserFactory
source
- XML源,可以是文件、流、路径等public static XmlSaxReader of(SAXParserFactory factory, InputSource source)
factory
- SAXParserFactory
source
- XML源,可以是文件、流、路径等public void read(ContentHandler contentHandler)
contentHandler
- XML流处理器,用于按照Element处理xmlCopyright © 2025. All rights reserved.