Here you can find the source of getNodeAttributesToString(Node node)
Parameter | Description |
---|---|
node | The Node |
public static String getNodeAttributesToString(Node node)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; public class Main { /**//from w w w . jav a 2 s . c om * Returns in a String the attributes and values of the node. * * @param node * The {@link Node} * @return The String of attributes and values. */ public static String getNodeAttributesToString(Node node) { String atributos = ""; String coma = ""; for (int j = 0; j < node.getAttributes().getLength(); j++) { Node atributo = node.getAttributes().item(j); atributos = atributos + coma + atributo.toString(); coma = " ; "; } return atributos; } }