本文整理汇总了Java中org.jdom2.JDOMFactory类的典型用法代码示例。如果您正苦于以下问题:Java JDOMFactory类的具体用法?Java JDOMFactory怎么用?Java JDOMFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JDOMFactory类属于org.jdom2包,在下文中一共展示了JDOMFactory类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseXHTMLDocument
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public static Document parseXHTMLDocument(String xhtml, JDOMFactory factory) throws IOException, JDOMException
{
//DTD ersetzen, da die originale nicht erreichbar bzw. nur sehr langsam ist,
xhtml = xhtml.replace("http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", "http://localhost:8777/dtd/www.w3.org/TR/xhtml11/DTD/xhtml11.dtd");
ByteArrayInputStream bais = new ByteArrayInputStream(xhtml.getBytes("UTF-8"));
SAXBuilder builder = new SAXBuilder(XMLReaders.NONVALIDATING);
builder.setFeature("http://xml.org/sax/features/external-general-entities", false);
builder.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
builder.setFeature("http://xml.org/sax/features/resolve-dtd-uris", false);
builder.setFeature("http://xml.org/sax/features/validation", false);
builder.setExpandEntities(false);
if (factory != null)
{
builder.setJDOMFactory(factory);
}
Document document = builder.build(bais);
return document;
}
开发者ID:finanzer,项目名称:epubfx,代码行数:19,代码来源:XHTMLUtils.java
示例2: configure
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Override
protected void configure() {
// Setup @MapScoped and bind MapDefinition as a seed object
install(new MapInjectionScope().new Manifest());
final FactoryModuleBuilder fmb = new FactoryModuleBuilder();
install(fmb.build(MapFilePreprocessor.Factory.class));
install(fmb.build(MapLogger.Factory.class));
bind(SAXHandler.class).to(BoundedSAXHandler.class);
bind(SAXHandlerFactory.class).toInstance(BoundedSAXHandler::new);
bind(JDOMFactory.class).to(BoundedJDOMFactory.class);
bind(PGMMap.Factory.class);
bind(MapConfiguration.class).to(PGMMapConfiguration.class);
bind(MapDoc.class).to(MapDocument.class);
inSet(MapRootParser.class);
bind(ValidationContext.class).to(FeatureDefinitionContext.class);
bind(MapModuleContext.class).in(MapScoped.class);
bind(ModuleExceptionHandler.class).to(MapModuleContext.class);
expose(MapDefinition.class);
expose(PGMMap.class);
requestStaticInjection(XMLUtils.class);
}
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:30,代码来源:MapManifest.java
示例3: saxBuilder
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Provides
SAXBuilder saxBuilder(SAXHandlerFactory saxHandlerFactory, JDOMFactory jdomFactory) {
return new SAXBuilder(null, saxHandlerFactory, jdomFactory);
}
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:5,代码来源:MapManifest.java
示例4: BoundedSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Inject public BoundedSAXHandler(JDOMFactory factory) {
super(factory);
}
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:4,代码来源:BoundedSAXHandler.java
示例5: JDom2Writer
import org.jdom2.JDOMFactory; //导入依赖的package包/类
/**
* @since 1.4.5
*/
public JDom2Writer(final Element container, final JDOMFactory factory, final NameCoder nameCoder) {
super(container, nameCoder);
documentFactory = factory;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:JDom2Writer.java
示例6: createSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Override
public SAXHandler createSAXHandler(JDOMFactory factory) {
return new EmptyAwareSAXHandler(factory);
}
开发者ID:Niels-NTG,项目名称:FTLAV,代码行数:5,代码来源:EmptyAwareSAXHandlerFactory.java
示例7: EmptyAwareSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public EmptyAwareSAXHandler(JDOMFactory factory) {
super(factory);
}
开发者ID:Niels-NTG,项目名称:FTLAV,代码行数:4,代码来源:EmptyAwareSAXHandlerFactory.java
示例8: JDom2Writer
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public JDom2Writer(Element paramElement, JDOMFactory paramJDOMFactory)
{
this(paramElement, paramJDOMFactory, new XmlFriendlyNameCoder());
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:JDom2Writer.java
示例9: createSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Override
public SAXHandler createSAXHandler( JDOMFactory factory ) {
return new EmptyAwareSAXHandler( factory );
}
开发者ID:Vhati,项目名称:Slipstream-Mod-Manager,代码行数:5,代码来源:EmptyAwareSAXHandlerFactory.java
示例10: EmptyAwareSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public EmptyAwareSAXHandler( JDOMFactory factory ) {
super( factory );
}
开发者ID:Vhati,项目名称:Slipstream-Mod-Manager,代码行数:4,代码来源:EmptyAwareSAXHandlerFactory.java
注:本文中的org.jdom2.JDOMFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论