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

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

本文整理了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

  1. private String getNodeValueByTagName( Node node, String tagName ) {
  2. if ( node != null && node.getFirstChild() != null ) {
  3. return node.getFirstChild().getNodeValue();
  4. } else {
  5. return null;
  6. }
  7. }

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

  1. private String getNodeValueByTagName( Element element, String tagName ) {
  2. Node node = getNodeByTagName( element, tagName );
  3. if ( node != null && node.getFirstChild() != null ) {
  4. return node.getFirstChild().getNodeValue();
  5. } else {
  6. return null;
  7. }
  8. }
  9. }

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

  1. private String getNodeValueByTagName( Element element, String tagName ) {
  2. Node node = getNodeByTagName( element, tagName );
  3. if ( node != null && node.getFirstChild() != null ) {
  4. return node.getFirstChild().getNodeValue();
  5. } else {
  6. return null;
  7. }
  8. }
  9. }

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

  1. protected String getValueRecursive(Node node) {
  2. if (node != null) {
  3. if (node.getNodeValue() != null) {
  4. return node.getNodeValue().trim();
  5. }
  6. if (node.getFirstChild() != null) {
  7. return getValueRecursive(node.getFirstChild());
  8. }
  9. }
  10. return null;
  11. }

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

  1. protected String getValueRecursive(Node node) {
  2. if (node != null) {
  3. if (node.getNodeValue() != null) {
  4. return node.getNodeValue();
  5. }
  6. if (node.getFirstChild() != null) {
  7. return getValueRecursive(node.getFirstChild());
  8. }
  9. }
  10. return null;
  11. }

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

  1. @Nullable
  2. private String getTextValue(@Nonnull final Node node) {
  3. Node child = node.getFirstChild();
  4. if (child != null && child.getNodeType() == TEXT_NODE) {
  5. return child.getNodeValue();
  6. }
  7. return null;
  8. }

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

  1. public ArrayList<String> getParameters(String name) {
  2. ArrayList<String> array = new ArrayList<String>();
  3. if (hasProperty(name)) {
  4. NodeList nodes = this.properties.getElementsByTagName(name);
  5. for (int i = 0; i < nodes.getLength(); i++) {
  6. array.add(nodes.item(i).getFirstChild().toString());
  7. }
  8. }
  9. return array;
  10. }

相关文章