com.google.gwt.user.client.Element.getNodeValue()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(113)

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

Element.getNodeValue介绍

暂无

代码示例

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

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
private static Element clone(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(clone(child));
  }
  return clone;
}

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

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
private static Element clone(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(clone(child));
  }
  return clone;
}

代码示例来源:origin: org.geomajas/geomajas-client-common-gwt

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
public Element cloneSvgElement(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName(), Dom.createUniqueId());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(cloneSvgElement(child));
  }
  return clone;
}

相关文章

微信公众号

最新文章

更多

Element类方法