{"action":"created","comment":{"url":"https://api.github.com/repos/wemrysi/quasar/pulls/comments/78858852","id":78858852,"diff_hunk":"@@ -0,0 +1,85 @@\n+/*\n+ * Copyright 2014–2016 SlamData Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package quasar.physical.marklogic\n+\n+import quasar.Predef._\n+import quasar.Data\n+\n+import scala.xml._\n+\n+import scalaz.{Node => _, _}, Scalaz._\n+\n+package object xml {\n+\n+  private val attributesKeyName = \"_attributes\"\n+\n+  import Data._\n+\n+  /** Example\n+    *\n+    * <foo type=\"baz\" id=\"1\">\n+    *   <bar>\n+    *     <baz>37</baz>\n+    *     <bat>one</bat>\n+    *     <bat>two</bat>\n+    *   </bar>\n+    *   <quux>lorem ipsum</quux>\n+    * </foo>\n+    *\n+    * {\n+    *   \"foo\": {\n+    *     \"_attributes\": {\n+    *       \"type\": \"baz\",\n+    *       \"id\": \"1\"\n+    *     },\n+    *     \"bar\": {\n+    *       \"baz\": \"37\",\n+    *       \"bat\": [\"one\", \"two\"]\n+    *     },\n+    *     \"quux\": \"lorem ipsum\"\n+    *   }\n+    * }\n+    */\n+  def toData(elem: Elem): Data = {\n+    Obj(ListMap(elem.label -> toDataImpl(elem.child.toList, elem.attributes.some)))","path":"marklogic/src/main/scala/quasar/physical/marklogic/xml/package.scala","position":58,"original_position":58,"commit_id":"f96746380a368624f60686a6d0614126a729f4a6","original_commit_id":"f96746380a368624f60686a6d0614126a729f4a6","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"body":"Not too surprisingly, you were right about `prefix + label`.\r\n\r\nBecause of the fact that `Data.Arr` wants a `List` and `Elem.chil` is a `Node*`. I think it's going to be hard to avoid many (if not all) of these `toList`. If you have something specific in mind, perhaps you could give it a quick try once this is merged.","created_at":"2016-09-14T22:50:26Z","updated_at":"2016-09-14T22:50:27Z","html_url":"https://github.com/wemrysi/quasar/pull/5#discussion_r78858852","pull_request_url":"https://api.github.com/repos/wemrysi/quasar/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/comments/78858852"},"html":{"href":"https://github.com/wemrysi/quasar/pull/5#discussion_r78858852"},"pull_request":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/wemrysi/quasar/pulls/5","id":85148586,"html_url":"https://github.com/wemrysi/quasar/pull/5","diff_url":"https://github.com/wemrysi/quasar/pull/5.diff","patch_url":"https://github.com/wemrysi/quasar/pull/5.patch","issue_url":"https://api.github.com/repos/wemrysi/quasar/issues/5","number":5,"state":"open","locked":false,"title":"First pass at implementing conversion from XML to quasar.Data","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"body":"I merged in master which is why the diff is bigger.","created_at":"2016-09-14T00:23:38Z","updated_at":"2016-09-14T22:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c0e40378817305e6a8fe26cab800e4d3f163e2d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wemrysi/quasar/pulls/5/commits","review_comments_url":"https://api.github.com/repos/wemrysi/quasar/pulls/5/comments","review_comment_url":"https://api.github.com/repos/wemrysi/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wemrysi/quasar/issues/5/comments","statuses_url":"https://api.github.com/repos/wemrysi/quasar/statuses/f96746380a368624f60686a6d0614126a729f4a6","head":{"label":"jedesah:topic/marklogic/xmlToData","ref":"topic/marklogic/xmlToData","sha":"f96746380a368624f60686a6d0614126a729f4a6","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"repo":{"id":39122146,"name":"Quasar","full_name":"jedesah/Quasar","owner":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jedesah/Quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/jedesah/Quasar","forks_url":"https://api.github.com/repos/jedesah/Quasar/forks","keys_url":"https://api.github.com/repos/jedesah/Quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jedesah/Quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jedesah/Quasar/teams","hooks_url":"https://api.github.com/repos/jedesah/Quasar/hooks","issue_events_url":"https://api.github.com/repos/jedesah/Quasar/issues/events{/number}","events_url":"https://api.github.com/repos/jedesah/Quasar/events","assignees_url":"https://api.github.com/repos/jedesah/Quasar/assignees{/user}","branches_url":"https://api.github.com/repos/jedesah/Quasar/branches{/branch}","tags_url":"https://api.github.com/repos/jedesah/Quasar/tags","blobs_url":"https://api.github.com/repos/jedesah/Quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jedesah/Quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jedesah/Quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/jedesah/Quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jedesah/Quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/jedesah/Quasar/languages","stargazers_url":"https://api.github.com/repos/jedesah/Quasar/stargazers","contributors_url":"https://api.github.com/repos/jedesah/Quasar/contributors","subscribers_url":"https://api.github.com/repos/jedesah/Quasar/subscribers","subscription_url":"https://api.github.com/repos/jedesah/Quasar/subscription","commits_url":"https://api.github.com/repos/jedesah/Quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/jedesah/Quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/jedesah/Quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/jedesah/Quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/jedesah/Quasar/contents/{+path}","compare_url":"https://api.github.com/repos/jedesah/Quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jedesah/Quasar/merges","archive_url":"https://api.github.com/repos/jedesah/Quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jedesah/Quasar/downloads","issues_url":"https://api.github.com/repos/jedesah/Quasar/issues{/number}","pulls_url":"https://api.github.com/repos/jedesah/Quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/jedesah/Quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/jedesah/Quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jedesah/Quasar/labels{/name}","releases_url":"https://api.github.com/repos/jedesah/Quasar/releases{/id}","deployments_url":"https://api.github.com/repos/jedesah/Quasar/deployments","created_at":"2015-07-15T07:12:13Z","updated_at":"2016-01-27T17:41:14Z","pushed_at":"2016-09-14T19:57:43Z","git_url":"git://github.com/jedesah/Quasar.git","ssh_url":"git@github.com:jedesah/Quasar.git","clone_url":"https://github.com/jedesah/Quasar.git","svn_url":"https://github.com/jedesah/Quasar","homepage":null,"size":13775,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wemrysi:feature/1372-ml-xml-data","ref":"feature/1372-ml-xml-data","sha":"f90ac01238fcc930b345a7b62b016c4d4f2e17f8","user":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"repo":{"id":40374964,"name":"quasar","full_name":"wemrysi/quasar","owner":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wemrysi/quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/wemrysi/quasar","forks_url":"https://api.github.com/repos/wemrysi/quasar/forks","keys_url":"https://api.github.com/repos/wemrysi/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wemrysi/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wemrysi/quasar/teams","hooks_url":"https://api.github.com/repos/wemrysi/quasar/hooks","issue_events_url":"https://api.github.com/repos/wemrysi/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/wemrysi/quasar/events","assignees_url":"https://api.github.com/repos/wemrysi/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/wemrysi/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/wemrysi/quasar/tags","blobs_url":"https://api.github.com/repos/wemrysi/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wemrysi/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wemrysi/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/wemrysi/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wemrysi/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/wemrysi/quasar/languages","stargazers_url":"https://api.github.com/repos/wemrysi/quasar/stargazers","contributors_url":"https://api.github.com/repos/wemrysi/quasar/contributors","subscribers_url":"https://api.github.com/repos/wemrysi/quasar/subscribers","subscription_url":"https://api.github.com/repos/wemrysi/quasar/subscription","commits_url":"https://api.github.com/repos/wemrysi/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/wemrysi/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/wemrysi/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/wemrysi/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/wemrysi/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/wemrysi/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wemrysi/quasar/merges","archive_url":"https://api.github.com/repos/wemrysi/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wemrysi/quasar/downloads","issues_url":"https://api.github.com/repos/wemrysi/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/wemrysi/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/wemrysi/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/wemrysi/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wemrysi/quasar/labels{/name}","releases_url":"https://api.github.com/repos/wemrysi/quasar/releases{/id}","deployments_url":"https://api.github.com/repos/wemrysi/quasar/deployments","created_at":"2015-08-07T18:29:08Z","updated_at":"2015-09-14T20:43:00Z","pushed_at":"2016-09-14T21:12:51Z","git_url":"git://github.com/wemrysi/quasar.git","ssh_url":"git@github.com:wemrysi/quasar.git","clone_url":"https://github.com/wemrysi/quasar.git","svn_url":"https://github.com/wemrysi/quasar","homepage":null,"size":13977,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/5"},"html":{"href":"https://github.com/wemrysi/quasar/pull/5"},"issue":{"href":"https://api.github.com/repos/wemrysi/quasar/issues/5"},"comments":{"href":"https://api.github.com/repos/wemrysi/quasar/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/wemrysi/quasar/statuses/f96746380a368624f60686a6d0614126a729f4a6"}}}}
{"actor":{"display_login":"jedesah"}}