{"action":"opened","issue":{"url":"https://api.github.com/repos/googleapis/google-http-java-client/issues/475","repository_url":"https://api.github.com/repos/googleapis/google-http-java-client","labels_url":"https://api.github.com/repos/googleapis/google-http-java-client/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/google-http-java-client/issues/475/comments","events_url":"https://api.github.com/repos/googleapis/google-http-java-client/issues/475/events","html_url":"https://github.com/googleapis/google-http-java-client/issues/475","id":362965470,"node_id":"MDU6SXNzdWUzNjI5NjU0NzA=","number":475,"title":"XML Parsing: Enum as Element Type","user":{"login":"geri-m","id":15243754,"node_id":"MDQ6VXNlcjE1MjQzNzU0","avatar_url":"https://avatars2.githubusercontent.com/u/15243754?v=4","gravatar_id":"","url":"https://api.github.com/users/geri-m","html_url":"https://github.com/geri-m","followers_url":"https://api.github.com/users/geri-m/followers","following_url":"https://api.github.com/users/geri-m/following{/other_user}","gists_url":"https://api.github.com/users/geri-m/gists{/gist_id}","starred_url":"https://api.github.com/users/geri-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geri-m/subscriptions","organizations_url":"https://api.github.com/users/geri-m/orgs","repos_url":"https://api.github.com/users/geri-m/repos","events_url":"https://api.github.com/users/geri-m/events{/privacy}","received_events_url":"https://api.github.com/users/geri-m/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-23T18:28:43Z","updated_at":"2018-09-23T18:28:43Z","closed_at":null,"author_association":"NONE","body":"In the current implementation, an enumeration is only support as XML-Attribut, but not as an Element. We should have enumerations also as elements. \r\n\r\nCurrently this kind of XMLs/PoJos can be parsed/serialized\r\n\r\n```xml\r\n<?xml version=\"1.0\"?><any attributeEnum=\"ENUM_1\" xmlns=\"http://www.w3.org/2005/Atom\" />\"\r\n```\r\n\r\n```java\r\n  public static class AnyTypeEnumAttributeOnly {\r\n    @Key(\"@attributeEnum\")\r\n    public XmlEnumTest.AnyEnum attributeEnum;\r\n  }`\r\n```\r\n\r\nThese XMLs/PoJos causes an exception (no Standard constructor for primitiv type).\r\n\r\n```xml\r\n<?xml version=\"1.0\"?><any xmlns=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_3</elementEnum></any>\r\n```\r\n\r\n```java\r\n  public static class AnyTypeEnumElementOnly {\r\n    @Key\r\n    public XmlEnumTest.AnyEnum elementEnum;\r\n  }\r\n```"}}
{"actor":{"display_login":"geri-m"}}