org.jvnet.hk2.config.DomDocument.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(129)

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

DomDocument.<init>介绍

暂无

代码示例

代码示例来源:origin: javaee/glassfish

  1. public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
  2. DomDocument document = new DomDocument(habitat);
  3. parse(in, document);
  4. return document;
  5. }

代码示例来源:origin: javaee/glassfish

  1. /**
  2. * Parses the given source as a config file, and adds resulting
  3. * {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
  4. */
  5. public DomDocument parse(URL source) {
  6. return parse(source, new DomDocument(habitat));
  7. }

代码示例来源:origin: stackoverflow.com

  1. $xml = new \DomDocument("1.0","UTF-8");
  2. $xml->formatOutput = true;
  3. $xml_data = $xml->createElement("Element_Container","Container Value");
  4. $xml_data = $xml->appendChild($xml_data);
  5. $xml->saveXML();
  6. $xml_status->save($xml_file_path);

代码示例来源:origin: stackoverflow.com

  1. $ch = curl_init();
  2. curl_setopt($ch, CURLOPT_URL, $url);
  3. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  4. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  5. $data = curl_exec($ch);
  6. curl_close($ch);
  7. // libxml_use_internal_errors(true);
  8. $oDom = new DomDocument();
  9. $oDom->loadHTML($data);
  10. // Go through DOM and look for error (it's similar if it'd be
  11. // <p class="error">error message</p> or whatever)
  12. $errors = $oDom->getElementsByTagName( "error" ); // or however you get errors
  13. foreach( $errors as $error ) {
  14. if(strstr($error->nodeValue, 'SOME ERROR')) {
  15. echo 'SOME ERROR occurred';
  16. }
  17. }

代码示例来源:origin: stackoverflow.com

  1. $post_item_detail = substr($_POST["itd"], 0,10);
  2. $xml = new DomDocument();
  3. $xml->load("item.xml");

代码示例来源:origin: org.glassfish.hk2/hk2-config

  1. /**
  2. * Parses the given source as a config file, and adds resulting
  3. * {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
  4. */
  5. public DomDocument parse(URL source) {
  6. return parse(source, new DomDocument(habitat));
  7. }

代码示例来源:origin: org.glassfish.hk2/config

  1. public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
  2. DomDocument document = new DomDocument(habitat);
  3. parse(in, document);
  4. return document;
  5. }

代码示例来源:origin: com.sun.enterprise/config

  1. public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
  2. DomDocument document = new DomDocument(habitat);
  3. parse(in, document);
  4. return document;
  5. }

代码示例来源:origin: org.glassfish.hk2/hk2-config

  1. public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
  2. DomDocument document = new DomDocument(habitat);
  3. parse(in, document);
  4. return document;
  5. }

代码示例来源:origin: org.glassfish.hk2/config

  1. /**
  2. * Parses the given source as a config file, and adds resulting
  3. * {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
  4. */
  5. public DomDocument parse(URL source) {
  6. return parse(source, new DomDocument(habitat));
  7. }

代码示例来源:origin: com.sun.enterprise/config

  1. /**
  2. * Parses the given source as a config file, and adds resulting
  3. * {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
  4. */
  5. public DomDocument parse(URL source) {
  6. return parse(source, new DomDocument(habitat));
  7. }

代码示例来源:origin: eclipse-ee4j/glassfish

  1. public DomDocument parse(XMLStreamReader in) throws XMLStreamException {
  2. DomDocument document = new DomDocument(habitat);
  3. parse(in, document);
  4. return document;
  5. }

代码示例来源:origin: eclipse-ee4j/glassfish

  1. /**
  2. * Parses the given source as a config file, and adds resulting
  3. * {@link Dom}s into {@link Habitat} as {@link Inhabitant}s.
  4. */
  5. public DomDocument parse(URL source) {
  6. return parse(source, new DomDocument(habitat));
  7. }

代码示例来源:origin: org.glassfish.main.common/amx-core

  1. /** works only for @Configured types */
  2. public static Class[] getTypesImplementing(final Class<?> clazz)
  3. {
  4. final DomDocument domDoc = new DomDocument(InjectedValues.getInstance().getHabitat());
  5. try
  6. {
  7. final List<ConfigModel> models = domDoc.getAllModelsImplementing(clazz);
  8. final Class[] interfaces = new Class[models == null ? 0 : models.size()];
  9. if (models != null)
  10. {
  11. int i = 0;
  12. for (final ConfigModel model : models)
  13. {
  14. final String classname = model.targetTypeName;
  15. final Class<?> intf = model.classLoaderHolder.loadClass(classname);
  16. interfaces[i] = intf;
  17. //System.out.println( "Loaded: " + intf + " with tagName of " + model.getTagName() );
  18. ++i;
  19. }
  20. }
  21. return interfaces;
  22. }
  23. catch (final Exception e)
  24. {
  25. AMXLoggerInfo.getLogger().log( Level.INFO, AMXLoggerInfo.cantGetTypesImplementing,
  26. new Object[] {clazz, e.getLocalizedMessage()} );
  27. throw new RuntimeException(e);
  28. }
  29. }

相关文章