本文整理了Java中javax.xml.parsers.SAXParser.getParser()
方法的一些代码示例,展示了SAXParser.getParser()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SAXParser.getParser()
方法的具体详情如下:
包路径:javax.xml.parsers.SAXParser
类名称:SAXParser
方法名:getParser
[英]Returns the SAX parser that is encapsulated by the implementation of this class.
[中]返回由此类实现封装的SAX解析器。
代码示例来源:origin: jersey/jersey
@Override
@SuppressWarnings("deprecation")
public org.xml.sax.Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: org.apache.ant/ant
/**
* Returns a newly created SAX 1 Parser, using the default parser
* factory.
*
* @return a SAX 1 Parser.
* @throws BuildException on error.
* @see #getParserFactory
* @since Ant 1.5
*/
public static Parser getParser() throws BuildException {
try {
return newSAXParser(getParserFactory()).getParser();
} catch (SAXException e) {
throw convertToBuildException(e);
}
}
代码示例来源:origin: robovm/robovm
Parser parser = this.getParser();
if (hb != null) {
parser.setDocumentHandler(hb);
代码示例来源:origin: geoserver/geoserver
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
ParserAdapter adapter = new ParserAdapter(parser.getParser());
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
@Override
@SuppressWarnings("deprecation")
public org.xml.sax.Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: com.atlassian.security/atlassian-secure-xml
@Override
public Parser getParser() throws SAXException
{
return delegate.getParser();
}
代码示例来源:origin: org.glassfish.jersey.media/jersey-media-jaxb
@Override
@SuppressWarnings("deprecation")
public org.xml.sax.Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
@Override
public Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
@Override
@SuppressWarnings("deprecation")
public org.xml.sax.Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
@Override
@SuppressWarnings("deprecation")
public org.xml.sax.Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: jersey/jersey-1.x
@Override
public Parser getParser() throws SAXException {
return sp.getParser();
}
代码示例来源:origin: com.sun.org.apache.xml.internal/resolver
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
saxParser = spf.newSAXParser();
parser = saxParser.getParser();
documentHandler = null;
dtdHandler = null;
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
saxParser = spf.newSAXParser();
parser = saxParser.getParser();
documentHandler = null;
dtdHandler = null;
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: xml-resolver/xml-resolver
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
saxParser = spf.newSAXParser();
parser = saxParser.getParser();
documentHandler = null;
dtdHandler = null;
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: org.apache.xml/com.springsource.org.apache.xml.resolver
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
saxParser = spf.newSAXParser();
parser = saxParser.getParser();
documentHandler = null;
dtdHandler = null;
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
saxParser = spf.newSAXParser();
parser = saxParser.getParser();
documentHandler = null;
dtdHandler = null;
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
public void parse(DefaultHandler handler) throws IOException, SAXException {
SAXParser sp = createSaxParser();
ParserAdapter pa = new ParserAdapter(sp.getParser());
pa.setContentHandler(handler);
pa.parse(new InputSource(reader));
}
代码示例来源:origin: com.google.gdata/gdata-java-client
public void parse(DefaultHandler handler) throws IOException, SAXException {
SAXParser sp = createSaxParser();
ParserAdapter pa = new ParserAdapter(sp.getParser());
pa.setContentHandler(handler);
pa.parse(new InputSource(reader));
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
public void parse(DefaultHandler handler) throws IOException, SAXException {
SAXParser sp = createSaxParser();
ParserAdapter pa = new ParserAdapter(sp.getParser());
pa.setContentHandler(handler);
pa.parse(new InputSource(reader));
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Used to track namespace declarations seen within the current parse
* stream.
*/
private static class NamespaceDecl {
private NamespaceDecl(XmlNamespace ns) {
this.ns = ns;
}
/** The declared namespace */
XmlNamespace ns;
/**
* {@code true} if the namespace declaration occurs inside an XmlBlob.
*/
boolean inBlob;
}
内容来源于网络,如有侵权,请联系作者删除!