本文整理了Java中org.jvnet.hk2.config.DomDocument.<init>()
方法的一些代码示例,展示了DomDocument.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DomDocument.<init>()
方法的具体详情如下:
包路径:org.jvnet.hk2.config.DomDocument
类名称:DomDocument
方法名:<init>
暂无
代码示例来源:origin: javaee/glassfish
public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
DomDocument document = new DomDocument(habitat);
parse(in, document);
return document;
}
代码示例来源:origin: javaee/glassfish
/**
* Parses the given source as a config file, and adds resulting
* {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
*/
public DomDocument parse(URL source) {
return parse(source, new DomDocument(habitat));
}
代码示例来源:origin: stackoverflow.com
$xml = new \DomDocument("1.0","UTF-8");
$xml->formatOutput = true;
$xml_data = $xml->createElement("Element_Container","Container Value");
$xml_data = $xml->appendChild($xml_data);
$xml->saveXML();
$xml_status->save($xml_file_path);
代码示例来源:origin: stackoverflow.com
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$data = curl_exec($ch);
curl_close($ch);
// libxml_use_internal_errors(true);
$oDom = new DomDocument();
$oDom->loadHTML($data);
// Go through DOM and look for error (it's similar if it'd be
// <p class="error">error message</p> or whatever)
$errors = $oDom->getElementsByTagName( "error" ); // or however you get errors
foreach( $errors as $error ) {
if(strstr($error->nodeValue, 'SOME ERROR')) {
echo 'SOME ERROR occurred';
}
}
代码示例来源:origin: stackoverflow.com
$post_item_detail = substr($_POST["itd"], 0,10);
$xml = new DomDocument();
$xml->load("item.xml");
代码示例来源:origin: org.glassfish.hk2/hk2-config
/**
* Parses the given source as a config file, and adds resulting
* {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
*/
public DomDocument parse(URL source) {
return parse(source, new DomDocument(habitat));
}
代码示例来源:origin: org.glassfish.hk2/config
public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
DomDocument document = new DomDocument(habitat);
parse(in, document);
return document;
}
代码示例来源:origin: com.sun.enterprise/config
public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
DomDocument document = new DomDocument(habitat);
parse(in, document);
return document;
}
代码示例来源:origin: org.glassfish.hk2/hk2-config
public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
DomDocument document = new DomDocument(habitat);
parse(in, document);
return document;
}
代码示例来源:origin: org.glassfish.hk2/config
/**
* Parses the given source as a config file, and adds resulting
* {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
*/
public DomDocument parse(URL source) {
return parse(source, new DomDocument(habitat));
}
代码示例来源:origin: com.sun.enterprise/config
/**
* Parses the given source as a config file, and adds resulting
* {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
*/
public DomDocument parse(URL source) {
return parse(source, new DomDocument(habitat));
}
代码示例来源:origin: eclipse-ee4j/glassfish
public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
DomDocument document = new DomDocument(habitat);
parse(in, document);
return document;
}
代码示例来源:origin: eclipse-ee4j/glassfish
/**
* Parses the given source as a config file, and adds resulting
* {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
*/
public DomDocument parse(URL source) {
return parse(source, new DomDocument(habitat));
}
代码示例来源:origin: org.glassfish.main.common/amx-core
/** works only for @Configured types */
public static Class[] getTypesImplementing(final Class<?> clazz)
{
final DomDocument domDoc = new DomDocument(InjectedValues.getInstance().getHabitat());
try
{
final List<ConfigModel> models = domDoc.getAllModelsImplementing(clazz);
final Class[] interfaces = new Class[models == null ? 0 : models.size()];
if (models != null)
{
int i = 0;
for (final ConfigModel model : models)
{
final String classname = model.targetTypeName;
final Class<?> intf = model.classLoaderHolder.loadClass(classname);
interfaces[i] = intf;
//System.out.println( "Loaded: " + intf + " with tagName of " + model.getTagName() );
++i;
}
}
return interfaces;
}
catch (final Exception e)
{
AMXLoggerInfo.getLogger().log( Level.INFO, AMXLoggerInfo.cantGetTypesImplementing,
new Object[] {clazz, e.getLocalizedMessage()} );
throw new RuntimeException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!