gpt4 book ai didi

org.mule.util.xmlsecurity.XMLSecureFactories.getDocumentBuilderFactory()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 15:32:40 27 4
gpt4 key购买 nike

本文整理了Java中org.mule.util.xmlsecurity.XMLSecureFactories.getDocumentBuilderFactory()方法的一些代码示例,展示了XMLSecureFactories.getDocumentBuilderFactory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSecureFactories.getDocumentBuilderFactory()方法的具体详情如下:
包路径:org.mule.util.xmlsecurity.XMLSecureFactories
类名称:XMLSecureFactories
方法名:getDocumentBuilderFactory

XMLSecureFactories.getDocumentBuilderFactory介绍

暂无

代码示例

代码示例来源:origin: org.mule.modules/mule-module-xml

private static org.w3c.dom.Document parseXML(InputSource source) throws Exception
{
  DocumentBuilderFactory factory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
  return factory.newDocumentBuilder().parse(source);
}

代码示例来源:origin: org.mule.modules/mule-module-xml

public static Node toDOMNode(Object src, MuleEvent event) throws Exception
{
  DocumentBuilderFactory builderFactory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
  builderFactory.setNamespaceAware(true);
  return toDOMNode(src, event, builderFactory);
}

代码示例来源:origin: org.mule.modules/mule-module-spring-config

/**
 * Convert w3c element to dom4j element
 *
 * @throws ParserConfigurationException
 */
public org.dom4j.Element convert(org.w3c.dom.Element element) throws ParserConfigurationException
{
  DocumentBuilderFactory factory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
  DocumentBuilder builder = factory.newDocumentBuilder();
  org.w3c.dom.Document doc1 = builder.newDocument();
  org.w3c.dom.Element importedElement = (org.w3c.dom.Element) doc1.importNode(element, Boolean.TRUE);
  doc1.appendChild(importedElement);
  // Convert w3c document to dom4j document
  DOMReader reader = new DOMReader();
  org.dom4j.Document doc2 = reader.read(doc1);
  return doc2.getRootElement();
}

代码示例来源:origin: org.mule.modules/mule-module-jersey

@Override
@PerThread
public DocumentBuilderFactory provide()
{
  DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
  if (!isXmlSecurityDisabled()) {
    f = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
  }
  f.setNamespaceAware(true);
  return f;
}

代码示例来源:origin: org.mule.modules/mule-module-xml

public XPathNodeExpressionEvaluator()
{
  try
  {
    builder = XMLSecureFactories.createDefault().getDocumentBuilderFactory().newDocumentBuilder();
  }
  catch (ParserConfigurationException e)
  {
    throw new ExpressionRuntimeException(XmlMessages.failedToCreateDocumentBuilder(), e);
  }
}

代码示例来源:origin: org.mule.modules/mule-module-xml

public void initialise() throws InitialisationException
{
  if (getDocumentBuilderFactory() == null)
  {
    DocumentBuilderFactory builderFactory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
    builderFactory.setNamespaceAware(true);
    setDocumentBuilderFactory(builderFactory);
  }
}

代码示例来源:origin: org.mule.modules/mule-module-xml

DocumentBuilderFactory factory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
result = new DOMResult(factory.newDocumentBuilder().newDocument());

代码示例来源:origin: org.mule.modules/mule-module-xml

DocumentBuilderFactory factory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
Document doc = factory.newDocumentBuilder().newDocument();
m.marshal(src, doc);

代码示例来源:origin: org.mule.modules/mule-module-spring-config

DocumentBuilderFactory factory = XMLSecureFactories.createDefault().getDocumentBuilderFactory();
Document doc = factory.newDocumentBuilder().newDocument();
doc.appendChild(doc.importNode(element, true));

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com