本文整理了Java中org.geotools.xml.Parser.parser()
方法的一些代码示例,展示了Parser.parser()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.parser()
方法的具体详情如下:
包路径:org.geotools.xml.Parser
类名称:Parser
方法名:parser
[英]the sax parser driving the handler
[中]驱动处理程序的sax解析器
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Parses an instance documented defined by a sax input source.
* <p>
* The object returned from the parse is the object which has been bound to the root
* element of the document. This method should only be called once for a single instance document.
* </p>
*
* @return The object representation of the root element of the document.
*
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
public Object parse(InputSource source)
throws IOException, SAXException, ParserConfigurationException {
parser = parser();
parser.setContentHandler(handler);
parser.setErrorHandler(handler);
parser.parse(source);
return handler.getValue();
}
代码示例来源:origin: org.geotools/gt2-xml-xsd
/**
* Parses an instance documented defined by a sax input source.
* <p>
* The object returned from the parse is the object which has been bound to the root
* element of the document. This method should only be called once for a single instance document.
* </p>
*
* @return The object representation of the root element of the document.
*
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
public Object parse(InputSource source) throws IOException, SAXException, ParserConfigurationException {
parser = parser();
parser.setContentHandler( handler );
parser.setErrorHandler( handler );
parser.parse( source );
return handler.getValue();
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Parses an instance documented defined by a sax input source.
* <p>
* The object returned from the parse is the object which has been bound to the root
* element of the document. This method should only be called once for a single instance document.
* </p>
*
* @return The object representation of the root element of the document.
*
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
public Object parse(InputSource source)
throws IOException, SAXException, ParserConfigurationException {
parser = parser();
parser.setContentHandler(handler);
parser.setErrorHandler(handler);
parser.parse(source);
return handler.getValue();
}
内容来源于网络,如有侵权,请联系作者删除!