本文整理汇总了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;
}
示例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);
}
示例3: saxBuilder
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Provides
SAXBuilder saxBuilder(SAXHandlerFactory saxHandlerFactory, JDOMFactory jdomFactory) {
return new SAXBuilder(null, saxHandlerFactory, jdomFactory);
}
示例4: BoundedSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Inject public BoundedSAXHandler(JDOMFactory factory) {
super(factory);
}
示例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;
}
示例6: createSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Override
public SAXHandler createSAXHandler(JDOMFactory factory) {
return new EmptyAwareSAXHandler(factory);
}
示例7: EmptyAwareSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public EmptyAwareSAXHandler(JDOMFactory factory) {
super(factory);
}
示例8: JDom2Writer
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public JDom2Writer(Element paramElement, JDOMFactory paramJDOMFactory)
{
this(paramElement, paramJDOMFactory, new XmlFriendlyNameCoder());
}
示例9: createSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
@Override
public SAXHandler createSAXHandler( JDOMFactory factory ) {
return new EmptyAwareSAXHandler( factory );
}
示例10: EmptyAwareSAXHandler
import org.jdom2.JDOMFactory; //导入依赖的package包/类
public EmptyAwareSAXHandler( JDOMFactory factory ) {
super( factory );
}