-
-
Save LasMD/4357365 to your computer and use it in GitHub Desktop.
this is a code for making an XML sheet by using a loop . the vector passed for the loop comes from a different location with a static number of values(5 values all the time). after finishing the work all the elements were removed from the vector .. Kindly debug this code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public synchronized String xmlWrite(String rootEle){ | |
sb.delete(0,sb.length()); | |
StringBuffer append = sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<").append(rootEle).append(">"); | |
String s=""; | |
for(int i=0;i<v.size();i++){ | |
s=s.concat("<vectorData>"+(String)v.elementAt(i)+"</vectorData>"); | |
} | |
append.append(s); | |
append.append("</").append(rootEle).append(">"); | |
String s2=append.toString(); | |
return s2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment