示例#1
0
 protected String readElement(boolean includeOuterTag)
     throws XmlParseException, XmlPullParserException, IOException {
   XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
   XmlSerializer out = factory.newSerializer();
   StringWriter sw = new StringWriter();
   out.setOutput(sw);
   // out.startDocument("UTF-8", true);
   readElement(out, includeOuterTag);
   return sw.toString();
   // IOUtils.copy(tpis, new OutputStreamWriter(System.out), "UTF-8");
 }
示例#2
0
 protected void skipElement() throws XmlParseException, XmlPullParserException, IOException {
   readElement(null, false);
 }