Skip to content

Commit

Permalink
Support @ XPath for element attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrosxristoforos authored Mar 8, 2022
2 parents cbc1f30 + 2f97197 commit b99b12d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ try {
if (nodes.length) {
var output = [];
for (var i = 0; i < nodes.length; i++) {
output.push(nodes[i].firstChild.data);
var node = nodes[i];
var firstChild = node.firstChild;
if (firstChild) {
output.push(firstChild.data);
} else {
output.push(node.value);
}
}
core.setOutput('info', output);
console.log(`Output: ${output}`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-xml-info",
"version": "1.0.1",
"version": "1.1.0",
"description": "Get Information from XML files to use into your GitHub workflows",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit b99b12d

Please sign in to comment.