Examples of XmlNamespaceDictionary


Examples of com.google.api.client.xml.XmlNamespaceDictionary

  }
 
  public static void testAtomParse () {
    FileInputStream fis = null;
    try {
      XmlNamespaceDictionary nameSpace = new XmlNamespaceDictionary().set("", "http://www.w3.org/2005/Atom").set("db", "http://www.douban.com/xmlns/").set("gd", "http://schemas.google.com/g/2005").set("openSearch", "http://a9.com/-/spec/opensearchrss/1.0/").set("opensearch", "http://a9.com/-/spec/opensearchrss/1.0/");
      XmlObjectParser parser = new XmlObjectParser(nameSpace);
      //JsonObjectParser parser = new JsonObjectParser(new JacksonFactory());
      fis = new FileInputStream("/home/zwei/doubantestxml");
      DoubanPeopleEntry result = parser.parseAndClose(fis, Charset.forName("utf-8"), DoubanPeopleEntry.class);
      System.out.println("result : " + result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.