Java XML Node Append addImageSource(Node test, List holder)

Here you can find the source of addImageSource(Node test, List holder)

Description

add Image Source

License

Apache License

Declaration

protected static void addImageSource(Node test, List holder) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.*;

import java.util.*;

public class Main {
    protected static void addImageSource(Node test, List holder) {
        if (test.getNodeType() != Node.ELEMENT_NODE)
            return;
        Element RealTest = (Element) test;
        Node SourceNode = RealTest.getAttributeNode("SRC");
        if (SourceNode == null)
            return;
        String text = SourceNode.getNodeValue();
        if (text == null || text.length() == 0)
            return;
        holder.add(text);/* ww  w. j av  a 2  s .  c o m*/
    }
}

Related

  1. addComment(Node node, String comment)
  2. addDescendants(Node node, List descendants)
  3. addNodeValue(Node node, String name, boolean value)
  4. addValue(Node node, String value)
  5. appendChild(Node parent, Node child)
  6. appendForeignChild(Node node, Node foreignChild)