本文整理汇总了Java中com.sun.org.apache.xml.internal.utils.XMLReaderManager类的典型用法代码示例。如果您正苦于以下问题:Java XMLReaderManager类的具体用法?Java XMLReaderManager怎么用?Java XMLReaderManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XMLReaderManager类属于com.sun.org.apache.xml.internal.utils包,在下文中一共展示了XMLReaderManager类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parse
import com.sun.org.apache.xml.internal.utils.XMLReaderManager; //导入依赖的package包/类
public void parse (InputSource input) throws SAXException, IOException
{
XMLReader managedReader = null;
try {
if (getParent() == null) {
try {
managedReader = XMLReaderManager.getInstance(_useServicesMechanism)
.getXMLReader();
setParent(managedReader);
} catch (SAXException e) {
throw new SAXException(e.toString());
}
}
// call parse on the parent
getParent().parse(input);
} finally {
if (managedReader != null) {
XMLReaderManager.getInstance(_useServicesMechanism).releaseXMLReader(managedReader);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:TrAXFilter.java
示例2: TransformerImpl
import com.sun.org.apache.xml.internal.utils.XMLReaderManager; //导入依赖的package包/类
protected TransformerImpl(Translet translet, Properties outputProperties,
int indentNumber, TransformerFactoryImpl tfactory)
{
_translet = (AbstractTranslet) translet;
_properties = createOutputProperties(outputProperties);
_propertiesClone = (Properties) _properties.clone();
_indentNumber = indentNumber;
_tfactory = tfactory;
_useServicesMechanism = _tfactory.useServicesMechnism();
_accessExternalStylesheet = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET);
_accessExternalDTD = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD);
_securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER);
_readerManager = XMLReaderManager.getInstance(_useServicesMechanism);
_readerManager.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD);
_readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing);
_readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager);
//_isIncremental = tfactory._incremental;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:TransformerImpl.java
示例3: getXMLReader
import com.sun.org.apache.xml.internal.utils.XMLReaderManager; //导入依赖的package包/类
/**
* This method returns the SAX2 parser to use with the InputSource
* obtained from this URI.
* It may return null if any SAX2-conformant XML parser can be used,
* or if getInputSource() will also return null. The parser must
* be free for use (i.e., not currently in use for another parse().
* After use of the parser is completed, the releaseXMLReader(XMLReader)
* must be called.
*
* @param inputSource The value returned from the URIResolver.
* @return a SAX2 XMLReader to use to resolve the inputSource argument.
*
* @return non-null XMLReader reference ready to parse.
*/
synchronized public XMLReader getXMLReader(Source inputSource)
{
try
{
XMLReader reader = (inputSource instanceof SAXSource)
? ((SAXSource) inputSource).getXMLReader() : null;
// If user did not supply a reader, ask for one from the reader manager
if (null == reader) {
if (m_readerManager == null) {
m_readerManager = XMLReaderManager.getInstance(super.useServicesMechnism());
}
reader = m_readerManager.getXMLReader();
}
return reader;
} catch (SAXException se) {
throw new DTMException(se.getMessage(), se);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:DTMManagerDefault.java
示例4: TransformerImpl
import com.sun.org.apache.xml.internal.utils.XMLReaderManager; //导入依赖的package包/类
protected TransformerImpl(Translet translet, Properties outputProperties,
int indentNumber, TransformerFactoryImpl tfactory)
{
_translet = (AbstractTranslet) translet;
_properties = createOutputProperties(outputProperties);
_propertiesClone = (Properties) _properties.clone();
_indentNumber = indentNumber;
_tfactory = tfactory;
_useServicesMechanism = _tfactory.useServicesMechnism();
_accessExternalStylesheet = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET);
_accessExternalDTD = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD);
_securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER);
_readerManager = XMLReaderManager.getInstance(_useServicesMechanism);
_readerManager.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD);
_readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing);
_readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager);
_cdataChunkSize = JdkXmlUtils.getValue(_tfactory.getAttribute(JdkXmlUtils.CDATA_CHUNK_SIZE),
JdkXmlUtils.CDATA_CHUNK_SIZE_DEFAULT);
_readerManager.setProperty(JdkXmlUtils.CDATA_CHUNK_SIZE, _cdataChunkSize);
_useCatalog = _tfactory.getFeature(XMLConstants.USE_CATALOG);
if (_useCatalog) {
_catalogFeatures = (CatalogFeatures)_tfactory.getAttribute(JdkXmlFeatures.CATALOG_FEATURES);
String catalogFiles = _catalogFeatures.get(CatalogFeatures.Feature.DEFER);
if (catalogFiles != null) {
_readerManager.setFeature(XMLConstants.USE_CATALOG, _useCatalog);
_readerManager.setProperty(JdkXmlFeatures.CATALOG_FEATURES, _catalogFeatures);
}
}
//_isIncremental = tfactory._incremental;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:TransformerImpl.java
注:本文中的com.sun.org.apache.xml.internal.utils.XMLReaderManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论