com.google.gwt.xml.client.Node.getFirstChild()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(89)

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

Node.getFirstChild介绍

[英]This method retrieves the first child.
[中]此方法检索第一个子级。

代码示例

代码示例来源:origin: pentaho/data-access

private String getNodeValueByTagName( Node node, String tagName ) {
 if ( node != null && node.getFirstChild() != null ) {
  return node.getFirstChild().getNodeValue();
 } else {
  return null;
 }
}

代码示例来源:origin: pentaho/data-access

private String getNodeValueByTagName( Element element, String tagName ) {
  Node node = getNodeByTagName( element, tagName );
  if ( node != null && node.getFirstChild() != null ) {
   return node.getFirstChild().getNodeValue();
  } else {
   return null;
  }
 }
}

代码示例来源:origin: pentaho/data-access

private String getNodeValueByTagName( Element element, String tagName ) {
  Node node = getNodeByTagName( element, tagName );
  if ( node != null && node.getFirstChild() != null ) {
   return node.getFirstChild().getNodeValue();
  } else {
   return null;
  }
 }
}

代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl

protected String getValueRecursive(Node node) {
  if (node != null) {
    if (node.getNodeValue() != null) {
      return node.getNodeValue().trim();
    }
    if (node.getFirstChild() != null) {
      return getValueRecursive(node.getFirstChild());
    }
  }
  return null;
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient

protected String getValueRecursive(Node node) {
  if (node != null) {
    if (node.getNodeValue() != null) {
      return node.getNodeValue();
    }
    if (node.getFirstChild() != null) {
      return getValueRecursive(node.getFirstChild());
    }
  }
  return null;
}

代码示例来源:origin: org.apache.cxf/cxf-rt-management-web

@Nullable
private String getTextValue(@Nonnull final Node node) {
  Node child = node.getFirstChild();
  if (child != null && child.getNodeType() == TEXT_NODE) {
    return child.getNodeValue();
  }
  return null;
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public ArrayList<String> getParameters(String name) {
  ArrayList<String> array = new ArrayList<String>();
  if (hasProperty(name)) {
    NodeList nodes = this.properties.getElementsByTagName(name);
    for (int i = 0; i < nodes.getLength(); i++) {
      array.add(nodes.item(i).getFirstChild().toString());
    }
  }
  return array;
}

相关文章