本文整理汇总了Java中org.apache.xalan.processor.TransformerFactoryImpl类的典型用法代码示例。如果您正苦于以下问题:Java TransformerFactoryImpl类的具体用法?Java TransformerFactoryImpl怎么用?Java TransformerFactoryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransformerFactoryImpl类属于org.apache.xalan.processor包,在下文中一共展示了TransformerFactoryImpl类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: transform
import org.apache.xalan.processor.TransformerFactoryImpl; //导入依赖的package包/类
/**
* Transform based on parameters
*
* @param xmlIn XML
* @param xslIn XSL
* @param result Result
* @param paramMap Parameter map
* @throws javax.xml.transform.TransformerException
* will be thrown
*/
public static void transform(Source xmlIn, Source xslIn, Result result, Map paramMap)
throws TransformerException {
try {
TransformerFactory transformerFactory = new TransformerFactoryImpl();
Transformer transformer = transformerFactory.newTransformer(xslIn);
if (paramMap != null) {
Set set = paramMap.keySet();
for (Object aSet : set) {
if (aSet != null) {
String key = (String) aSet;
String value = (String) paramMap.get(key);
transformer.setParameter(key, value);
}
}
}
transformer.transform(xmlIn, result);
} catch (TransformerException e) {
log.error(e.getMessage(), e);
throw e;
}
}
开发者ID:wso2,项目名称:carbon-commons,代码行数:32,代码来源:Util.java
示例2: createTransformerFactory
import org.apache.xalan.processor.TransformerFactoryImpl; //导入依赖的package包/类
public static TransformerFactory createTransformerFactory() {
final TransformerFactoryImpl factory = new TransformerFactoryImpl();
prepareFactory(factory);
return factory;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:XalanSupport.java
示例3: newTransformerFactory
import org.apache.xalan.processor.TransformerFactoryImpl; //导入依赖的package包/类
public SAXTransformerFactory newTransformerFactory() {
return new TransformerFactoryImpl();
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:XalanSchemaReaderFactory.java
示例4: initTransformerFactory
import org.apache.xalan.processor.TransformerFactoryImpl; //导入依赖的package包/类
public void initTransformerFactory(TransformerFactory factory) {
factory.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION, Boolean.TRUE);
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:4,代码来源:XalanSchemaReaderFactory.java
示例5: newInstance
import org.apache.xalan.processor.TransformerFactoryImpl; //导入依赖的package包/类
/**
* Returns Android's implementation of {@code TransformerFactory}. Unlike
* other Java implementations, this method does not consult system
* properties, properties files, or the services API.
*
* @throws TransformerFactoryConfigurationError never. Included for API
* compatibility with other Java implementations.
*/
public static TransformerFactory newInstance()
throws TransformerFactoryConfigurationError {
// instantiate the class directly rather than using reflection
return new TransformerFactoryImpl();
}
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:14,代码来源:TransformerFactory.java
注:本文中的org.apache.xalan.processor.TransformerFactoryImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论