Closed lei-xiaoming closed 3 weeks ago
After adding namespace, it succeeded.
- name: Get-app-version
id: getxml
uses: mavrosxristoforos/get-xml-info@2.0
with:
xml-file: 'config.xml'
xpath: '/w:widget/@version'
namespaces: '{"w": "http://www.w3.org/ns/widgets"}'
result
Run mavrosxristoforos/get-xml-info@2.0
Welcome to Get-XML-Version.
File to read: /home/runner/work/test-git-action/test-git-action/config.xml
XPath: /w:widget/@version
Zero Nodes Action: error
Namespaces: {"w": "http://www.w3.org/ns/widgets"}
File was read successfully. Proceeding to parse DOM.
Found 1 nodes.
Output: 1.1.1
Read xml file error,please help.
Welcome to Get-XML-Version. File to read: /home/runner/work/test-git-action/test-git-action/config.xml XPath: //widget/@version Zero Nodes Action: error Namespaces: null File was read successfully. Proceeding to parse DOM. Found 0 nodes. Your xpath did not return any nodes. Error: Your xpath did not return any nodes.