Old 9th September 2022, 17:15   #1
Kuropatka
Junior Member
 
Join Date: Sep 2022
Posts: 2
Question

Hi. I'm trying to select node from xml with below structure
code:
<hazelcast
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.3.xsd"
xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>orientdb</name>
<password>orientdb</password>
</group>
</hazelcast>



How I should select <name> node?
I tryed:
code:
- nsisXML::select '/hazelcast[@xmlns="http://www.hazelcast.com/schema/config"]/network/name'
- nsisXML::select '/hazelcast[@xmlns]/group/name'
- nsisXML::select '/hazelcast/group/name'



All of them not working.I can not understand there is the issue
Any ideas?

Is there way to ignore attributes when i select node?
Kuropatka is offline   Reply With Quote
Old 9th September 2022, 18:58   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,538
This plug-in uses MSXML so it is probably normal xpath syntax unless MSDN says otherwise.

https://extendsclass.com/xpath-tester.html might help.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th September 2022, 10:21   #3
Kuropatka
Junior Member
 
Join Date: Sep 2022
Posts: 2
Thank you, Anders!

In my case works:
nsisXML::select "//*[local-name()='port']"
Kuropatka is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
nsis, nsisxml, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump