Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. private static void buildXMLTree(NodeList temp, List<String> xml) throws Exception{
  2.         xml.add("<"+temp.item(0).getNodeName()+">");
  3.         if(temp.item(0).getChildNodes().getLength() > 0) {
  4.             for(int i=0;i<temp.item(0).getChildNodes().getLength()-1;i++) {
  5.                 buildXMLTree(temp.item(i).getChildNodes(), xml);
  6.             }
  7.            
  8.         }
  9.         xml.add("</"+temp.item(0).getNodeName()+">");
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement