コード例 #1
0
  public static Xpp3Dom build(Reader reader, boolean trim)
      throws XmlPullParserException, IOException {
    XmlPullParser parser = new MXParser();

    parser.setInput(reader);

    try {
      return build(parser, trim);
    } finally {
      IOUtil.close(reader);
    }
  }
コード例 #2
0
  public static Xpp3Dom build(InputStream is, String encoding, boolean trim)
      throws XmlPullParserException, IOException {
    XmlPullParser parser = new MXParser();

    parser.setInput(is, encoding);

    try {
      return build(parser, trim);
    } finally {
      IOUtil.close(is);
    }
  }