{"action":"created","issue":{"url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/144","labels_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/144/comments","events_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/144/events","html_url":"https://github.com/ewoutkramer/fhir-net-api/issues/144","id":122448060,"number":144,"title":"FhirParser.ParseResourceFromXml allows for a resource to have multiple resources in the same <contained> tag","user":{"login":"CorinaCiocanea","id":13314456,"avatar_url":"https://avatars.githubusercontent.com/u/13314456?v=3","gravatar_id":"","url":"https://api.github.com/users/CorinaCiocanea","html_url":"https://github.com/CorinaCiocanea","followers_url":"https://api.github.com/users/CorinaCiocanea/followers","following_url":"https://api.github.com/users/CorinaCiocanea/following{/other_user}","gists_url":"https://api.github.com/users/CorinaCiocanea/gists{/gist_id}","starred_url":"https://api.github.com/users/CorinaCiocanea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorinaCiocanea/subscriptions","organizations_url":"https://api.github.com/users/CorinaCiocanea/orgs","repos_url":"https://api.github.com/users/CorinaCiocanea/repos","events_url":"https://api.github.com/users/CorinaCiocanea/events{/privacy}","received_events_url":"https://api.github.com/users/CorinaCiocanea/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-16T07:50:06Z","updated_at":"2015-12-16T10:54:03Z","closed_at":null,"body":"`FhirParser.ParseResourceFromXml` allows parsing a resource with multiple resources in the same `contained` tag. It just takes the first one adn ignores all others.\r\n\r\nAfter debugging this, the problem appears to be in the `XmlDomFhirReader.GetMembers()` method. Here for parsing an XElement we just take the `value = (XElement)elem.FirstNode;` and ignore any other nodes. We should probably check here the `Elements()` collection and throw an exception if there are multiple elements in it.\r\n\r\nSee also furore-fhir/spark#20"},"comment":{"url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/comments/165065997","html_url":"https://github.com/ewoutkramer/fhir-net-api/issues/144#issuecomment-165065997","issue_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/144","id":165065997,"user":{"login":"ewoutkramer","id":2276305,"avatar_url":"https://avatars.githubusercontent.com/u/2276305?v=3","gravatar_id":"","url":"https://api.github.com/users/ewoutkramer","html_url":"https://github.com/ewoutkramer","followers_url":"https://api.github.com/users/ewoutkramer/followers","following_url":"https://api.github.com/users/ewoutkramer/following{/other_user}","gists_url":"https://api.github.com/users/ewoutkramer/gists{/gist_id}","starred_url":"https://api.github.com/users/ewoutkramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewoutkramer/subscriptions","organizations_url":"https://api.github.com/users/ewoutkramer/orgs","repos_url":"https://api.github.com/users/ewoutkramer/repos","events_url":"https://api.github.com/users/ewoutkramer/events{/privacy}","received_events_url":"https://api.github.com/users/ewoutkramer/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T10:54:03Z","updated_at":"2015-12-16T10:54:03Z","body":"Yes, we should do that indeed. "}}