Android examples for XML:XML String
append XML Header to String
/*L/* www . ja v a 2 s.co m*/ * Copyright SAIC, SAIC-Frederick. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caadapter/LICENSE.txt for details. */ public class Main{ private StringBuffer xmlString; private static String xmlVersion = "1.0"; private static String encoding = "UTF-8"; /** * @param xmlHelper */ public static void appendHeader(XMLHelper xmlHelper) { xmlHelper.append("<?xml version=\"" + xmlVersion + "\" encoding=\"" + encoding + "\" ?>"); } public void append(String s) { xmlString.append(s); } }