{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/284","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/284/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/284/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/284","id":59374845,"number":284,"title":"Using Xml Parser throws java.lang.NullPointerException","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-High","name":"Priority-High","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-01T03:30:21Z","updated_at":"2015-03-01T03:30:22Z","closed_at":"2015-03-01T03:30:21Z","body":"```\nVersion of google-api-java-client (e.g. 1.5.0-beta)?\n1.4.1-beta\n\nJava environment (e.g. Java 6, Android 2.3, App Engine)?\nApp Engine\n\nDescribe the problem.\nTrying to parse Xml response throws \njava.lang.NullPointerException\n        at com.google.api.client.xml.Xml.getFieldName(Xml.java:513)\n        at com.google.api.client.xml.Xml.parseElementInternal(Xml.java:317)\n        at com.google.api.client.xml.Xml.parseElementInternal(Xml.java:454)\n        at com.google.api.client.xml.Xml.parseElement(Xml.java:198)\n        at com.google.api.client.http.xml.XmlHttpParser.parse(XmlHttpParser.java:72)\n        at com.google.api.client.http.HttpResponse.parseAs(HttpResponse.java:298)\n\nHow would you expect it to be fixed?\nI have managed to change com.google.api.client.xml.Xml file and it seems to \nwork for now. In my modified file line 513 (that have been throwing exception) \nis at number 514, and I have inserted the following code at line 513 \n\nif (alias == null) alias = \"\";\n\nThe root element of the xml response looks like this:\n<myRootElement xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \nxsi:noNamespaceSchemaLocation=\"http://example.com\" created=\"2011-08-29\">\nNo inner elements declare xml namespaces.\n```\n\nOriginal issue reported on code.google.com by `dsbo...@gmail.com` on 29 Aug 2011 at 10:49\n* Merged into: #23\n\nAttachments:\n* [Xml.java](https://storage.googleapis.com/google-code-attachments/google-api-java-client/issue-284/comment-0/Xml.java)\n"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76569014","html_url":"https://github.com/chrsmith/google-api-java-client/issues/284#issuecomment-76569014","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/284","id":76569014,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T03:30:22Z","updated_at":"2015-03-01T03:30:22Z","body":"```\nI had the same issue and another work around is to add an empty string alias to \nthe namespace dictionary.\n\nXmlNamespaceDictionary namespaceDictionary = new \nXmlNamespaceDictionary().set(\"\", \"\"); \n\n\n```\n\nOriginal comment by `craig2600` on 18 Oct 2011 at 11:04"}}