{"action":"created","comment":{"url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/comments/55003331","id":55003331,"diff_hunk":"@@ -0,0 +1,51 @@\n+package io.cloudslang.content.xml.services;\n+\n+import io.cloudslang.content.xml.entities.inputs.CommonInputs;\n+import io.cloudslang.content.xml.entities.inputs.CustomInputs;\n+import io.cloudslang.content.xml.utils.ResultUtils;\n+import io.cloudslang.content.xml.utils.XmlUtils;\n+import org.w3c.dom.Document;\n+import org.w3c.dom.Node;\n+import org.w3c.dom.NodeList;\n+\n+import javax.xml.namespace.NamespaceContext;\n+import javax.xml.transform.TransformerException;\n+import javax.xml.xpath.XPathExpressionException;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+/**\n+ * Created by markowis on 03/03/2016.\n+ */\n+public class AppendChildService {\n+    public Map<String, String> execute(CommonInputs commonInputs, CustomInputs customInputs){\n+        Map<String, String> result = new HashMap<>();\n+\n+        try {\n+            Document doc = XmlUtils.parseXML(commonInputs.getXmlDocument(), commonInputs.getSecureProcessing());\n+            NamespaceContext context = XmlUtils.createNamespaceContext(commonInputs.getXmlDocument());\n+\n+            Document childDoc = XmlUtils.parseXML(customInputs.getXmlElement(), commonInputs.getSecureProcessing());\n+            Node childNode = doc.importNode(childDoc.getDocumentElement(), true);\n+\n+            NodeList nodeList = XmlUtils.evaluateXPathQuery(doc, context, commonInputs.getXPathQuery());\n+\n+            if(nodeList.getLength() == 0){\n+                ResultUtils.populateFailureResult(result, \"Child not added: element not found\");\n+                return result;\n+            }","path":"score-xml/src/main/java/io/cloudslang/content/xml/services/AppendChildService.java","position":36,"original_position":36,"commit_id":"d96608cf70f5f8d0b52c007b73d959f44bd39f04","original_commit_id":"d96608cf70f5f8d0b52c007b73d959f44bd39f04","user":{"login":"gituser173","id":12094982,"avatar_url":"https://avatars.githubusercontent.com/u/12094982?v=3","gravatar_id":"","url":"https://api.github.com/users/gituser173","html_url":"https://github.com/gituser173","followers_url":"https://api.github.com/users/gituser173/followers","following_url":"https://api.github.com/users/gituser173/following{/other_user}","gists_url":"https://api.github.com/users/gituser173/gists{/gist_id}","starred_url":"https://api.github.com/users/gituser173/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gituser173/subscriptions","organizations_url":"https://api.github.com/users/gituser173/orgs","repos_url":"https://api.github.com/users/gituser173/repos","events_url":"https://api.github.com/users/gituser173/events{/privacy}","received_events_url":"https://api.github.com/users/gituser173/received_events","type":"User","site_admin":false},"body":"same here","created_at":"2016-03-04T08:44:00Z","updated_at":"2016-03-04T08:44:00Z","html_url":"https://github.com/CloudSlang/score-actions/pull/95#discussion_r55003331","pull_request_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/comments/55003331"},"html":{"href":"https://github.com/CloudSlang/score-actions/pull/95#discussion_r55003331"},"pull_request":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95","id":60696340,"html_url":"https://github.com/CloudSlang/score-actions/pull/95","diff_url":"https://github.com/CloudSlang/score-actions/pull/95.diff","patch_url":"https://github.com/CloudSlang/score-actions/pull/95.patch","issue_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/95","number":95,"state":"open","locked":false,"title":"added xml actions","user":{"login":"SamMarkowitz","id":9436355,"avatar_url":"https://avatars.githubusercontent.com/u/9436355?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMarkowitz","html_url":"https://github.com/SamMarkowitz","followers_url":"https://api.github.com/users/SamMarkowitz/followers","following_url":"https://api.github.com/users/SamMarkowitz/following{/other_user}","gists_url":"https://api.github.com/users/SamMarkowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMarkowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMarkowitz/subscriptions","organizations_url":"https://api.github.com/users/SamMarkowitz/orgs","repos_url":"https://api.github.com/users/SamMarkowitz/repos","events_url":"https://api.github.com/users/SamMarkowitz/events{/privacy}","received_events_url":"https://api.github.com/users/SamMarkowitz/received_events","type":"User","site_admin":false},"body":"@gituser173 please take a look and let me know if I'm moving in the right direction and what I've missed. I'm sure there's some stuff I didn't quite do correctly. Take it easy on me. It's my first shot at writing @Actions.","created_at":"2016-02-25T15:31:44Z","updated_at":"2016-03-04T08:44:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f4bd811db06a878ce72f84eea7c065f3d023cb1","assignee":{"login":"SamMarkowitz","id":9436355,"avatar_url":"https://avatars.githubusercontent.com/u/9436355?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMarkowitz","html_url":"https://github.com/SamMarkowitz","followers_url":"https://api.github.com/users/SamMarkowitz/followers","following_url":"https://api.github.com/users/SamMarkowitz/following{/other_user}","gists_url":"https://api.github.com/users/SamMarkowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMarkowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMarkowitz/subscriptions","organizations_url":"https://api.github.com/users/SamMarkowitz/orgs","repos_url":"https://api.github.com/users/SamMarkowitz/repos","events_url":"https://api.github.com/users/SamMarkowitz/events{/privacy}","received_events_url":"https://api.github.com/users/SamMarkowitz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CloudSlang/score-actions/milestones/16","html_url":"https://github.com/CloudSlang/score-actions/milestones/1.0%20-%20Stabilization","labels_url":"https://api.github.com/repos/CloudSlang/score-actions/milestones/16/labels","id":1598972,"number":16,"title":"1.0 - Stabilization","description":"","creator":{"login":"meshipeer","id":6988387,"avatar_url":"https://avatars.githubusercontent.com/u/6988387?v=3","gravatar_id":"","url":"https://api.github.com/users/meshipeer","html_url":"https://github.com/meshipeer","followers_url":"https://api.github.com/users/meshipeer/followers","following_url":"https://api.github.com/users/meshipeer/following{/other_user}","gists_url":"https://api.github.com/users/meshipeer/gists{/gist_id}","starred_url":"https://api.github.com/users/meshipeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meshipeer/subscriptions","organizations_url":"https://api.github.com/users/meshipeer/orgs","repos_url":"https://api.github.com/users/meshipeer/repos","events_url":"https://api.github.com/users/meshipeer/events{/privacy}","received_events_url":"https://api.github.com/users/meshipeer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-02-23T05:01:00Z","updated_at":"2016-03-02T07:25:31Z","due_on":"2016-03-13T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95/commits","review_comments_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95/comments","review_comment_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/95/comments","statuses_url":"https://api.github.com/repos/CloudSlang/score-actions/statuses/d96608cf70f5f8d0b52c007b73d959f44bd39f04","head":{"label":"CloudSlang:xml_actions","ref":"xml_actions","sha":"d96608cf70f5f8d0b52c007b73d959f44bd39f04","user":{"login":"CloudSlang","id":10261505,"avatar_url":"https://avatars.githubusercontent.com/u/10261505?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudSlang","html_url":"https://github.com/CloudSlang","followers_url":"https://api.github.com/users/CloudSlang/followers","following_url":"https://api.github.com/users/CloudSlang/following{/other_user}","gists_url":"https://api.github.com/users/CloudSlang/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudSlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudSlang/subscriptions","organizations_url":"https://api.github.com/users/CloudSlang/orgs","repos_url":"https://api.github.com/users/CloudSlang/repos","events_url":"https://api.github.com/users/CloudSlang/events{/privacy}","received_events_url":"https://api.github.com/users/CloudSlang/received_events","type":"Organization","site_admin":false},"repo":{"id":28305374,"name":"score-actions","full_name":"CloudSlang/score-actions","owner":{"login":"CloudSlang","id":10261505,"avatar_url":"https://avatars.githubusercontent.com/u/10261505?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudSlang","html_url":"https://github.com/CloudSlang","followers_url":"https://api.github.com/users/CloudSlang/followers","following_url":"https://api.github.com/users/CloudSlang/following{/other_user}","gists_url":"https://api.github.com/users/CloudSlang/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudSlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudSlang/subscriptions","organizations_url":"https://api.github.com/users/CloudSlang/orgs","repos_url":"https://api.github.com/users/CloudSlang/repos","events_url":"https://api.github.com/users/CloudSlang/events{/privacy}","received_events_url":"https://api.github.com/users/CloudSlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CloudSlang/score-actions","description":"CloudSlang Content Java Actions","fork":false,"url":"https://api.github.com/repos/CloudSlang/score-actions","forks_url":"https://api.github.com/repos/CloudSlang/score-actions/forks","keys_url":"https://api.github.com/repos/CloudSlang/score-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CloudSlang/score-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CloudSlang/score-actions/teams","hooks_url":"https://api.github.com/repos/CloudSlang/score-actions/hooks","issue_events_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/events{/number}","events_url":"https://api.github.com/repos/CloudSlang/score-actions/events","assignees_url":"https://api.github.com/repos/CloudSlang/score-actions/assignees{/user}","branches_url":"https://api.github.com/repos/CloudSlang/score-actions/branches{/branch}","tags_url":"https://api.github.com/repos/CloudSlang/score-actions/tags","blobs_url":"https://api.github.com/repos/CloudSlang/score-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CloudSlang/score-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CloudSlang/score-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/CloudSlang/score-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CloudSlang/score-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/CloudSlang/score-actions/languages","stargazers_url":"https://api.github.com/repos/CloudSlang/score-actions/stargazers","contributors_url":"https://api.github.com/repos/CloudSlang/score-actions/contributors","subscribers_url":"https://api.github.com/repos/CloudSlang/score-actions/subscribers","subscription_url":"https://api.github.com/repos/CloudSlang/score-actions/subscription","commits_url":"https://api.github.com/repos/CloudSlang/score-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/CloudSlang/score-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/CloudSlang/score-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/CloudSlang/score-actions/contents/{+path}","compare_url":"https://api.github.com/repos/CloudSlang/score-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CloudSlang/score-actions/merges","archive_url":"https://api.github.com/repos/CloudSlang/score-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CloudSlang/score-actions/downloads","issues_url":"https://api.github.com/repos/CloudSlang/score-actions/issues{/number}","pulls_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/CloudSlang/score-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/CloudSlang/score-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CloudSlang/score-actions/labels{/name}","releases_url":"https://api.github.com/repos/CloudSlang/score-actions/releases{/id}","deployments_url":"https://api.github.com/repos/CloudSlang/score-actions/deployments","created_at":"2014-12-21T16:30:37Z","updated_at":"2016-02-18T02:00:13Z","pushed_at":"2016-03-03T16:02:56Z","git_url":"git://github.com/CloudSlang/score-actions.git","ssh_url":"git@github.com:CloudSlang/score-actions.git","clone_url":"https://github.com/CloudSlang/score-actions.git","svn_url":"https://github.com/CloudSlang/score-actions","homepage":"","size":2203,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":4,"forks":19,"open_issues":4,"watchers":23,"default_branch":"master"}},"base":{"label":"CloudSlang:master","ref":"master","sha":"e0643108eb7084decabab2aba51f8c7bf7e4d6f9","user":{"login":"CloudSlang","id":10261505,"avatar_url":"https://avatars.githubusercontent.com/u/10261505?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudSlang","html_url":"https://github.com/CloudSlang","followers_url":"https://api.github.com/users/CloudSlang/followers","following_url":"https://api.github.com/users/CloudSlang/following{/other_user}","gists_url":"https://api.github.com/users/CloudSlang/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudSlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudSlang/subscriptions","organizations_url":"https://api.github.com/users/CloudSlang/orgs","repos_url":"https://api.github.com/users/CloudSlang/repos","events_url":"https://api.github.com/users/CloudSlang/events{/privacy}","received_events_url":"https://api.github.com/users/CloudSlang/received_events","type":"Organization","site_admin":false},"repo":{"id":28305374,"name":"score-actions","full_name":"CloudSlang/score-actions","owner":{"login":"CloudSlang","id":10261505,"avatar_url":"https://avatars.githubusercontent.com/u/10261505?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudSlang","html_url":"https://github.com/CloudSlang","followers_url":"https://api.github.com/users/CloudSlang/followers","following_url":"https://api.github.com/users/CloudSlang/following{/other_user}","gists_url":"https://api.github.com/users/CloudSlang/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudSlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudSlang/subscriptions","organizations_url":"https://api.github.com/users/CloudSlang/orgs","repos_url":"https://api.github.com/users/CloudSlang/repos","events_url":"https://api.github.com/users/CloudSlang/events{/privacy}","received_events_url":"https://api.github.com/users/CloudSlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CloudSlang/score-actions","description":"CloudSlang Content Java Actions","fork":false,"url":"https://api.github.com/repos/CloudSlang/score-actions","forks_url":"https://api.github.com/repos/CloudSlang/score-actions/forks","keys_url":"https://api.github.com/repos/CloudSlang/score-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CloudSlang/score-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CloudSlang/score-actions/teams","hooks_url":"https://api.github.com/repos/CloudSlang/score-actions/hooks","issue_events_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/events{/number}","events_url":"https://api.github.com/repos/CloudSlang/score-actions/events","assignees_url":"https://api.github.com/repos/CloudSlang/score-actions/assignees{/user}","branches_url":"https://api.github.com/repos/CloudSlang/score-actions/branches{/branch}","tags_url":"https://api.github.com/repos/CloudSlang/score-actions/tags","blobs_url":"https://api.github.com/repos/CloudSlang/score-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CloudSlang/score-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CloudSlang/score-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/CloudSlang/score-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CloudSlang/score-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/CloudSlang/score-actions/languages","stargazers_url":"https://api.github.com/repos/CloudSlang/score-actions/stargazers","contributors_url":"https://api.github.com/repos/CloudSlang/score-actions/contributors","subscribers_url":"https://api.github.com/repos/CloudSlang/score-actions/subscribers","subscription_url":"https://api.github.com/repos/CloudSlang/score-actions/subscription","commits_url":"https://api.github.com/repos/CloudSlang/score-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/CloudSlang/score-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/CloudSlang/score-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/CloudSlang/score-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/CloudSlang/score-actions/contents/{+path}","compare_url":"https://api.github.com/repos/CloudSlang/score-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CloudSlang/score-actions/merges","archive_url":"https://api.github.com/repos/CloudSlang/score-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CloudSlang/score-actions/downloads","issues_url":"https://api.github.com/repos/CloudSlang/score-actions/issues{/number}","pulls_url":"https://api.github.com/repos/CloudSlang/score-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/CloudSlang/score-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/CloudSlang/score-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CloudSlang/score-actions/labels{/name}","releases_url":"https://api.github.com/repos/CloudSlang/score-actions/releases{/id}","deployments_url":"https://api.github.com/repos/CloudSlang/score-actions/deployments","created_at":"2014-12-21T16:30:37Z","updated_at":"2016-02-18T02:00:13Z","pushed_at":"2016-03-03T16:02:56Z","git_url":"git://github.com/CloudSlang/score-actions.git","ssh_url":"git@github.com:CloudSlang/score-actions.git","clone_url":"https://github.com/CloudSlang/score-actions.git","svn_url":"https://github.com/CloudSlang/score-actions","homepage":"","size":2203,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":4,"forks":19,"open_issues":4,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95"},"html":{"href":"https://github.com/CloudSlang/score-actions/pull/95"},"issue":{"href":"https://api.github.com/repos/CloudSlang/score-actions/issues/95"},"comments":{"href":"https://api.github.com/repos/CloudSlang/score-actions/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CloudSlang/score-actions/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/CloudSlang/score-actions/statuses/d96608cf70f5f8d0b52c007b73d959f44bd39f04"}}}}