Forums de Wizou

Pour discuter des programmes de Wizou
It is currently Thu 28 Mar 2024, 14:36

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: issue in update a property value in XML
PostPosted: Mon 10 Aug 2015, 14:55 
Offline

Joined: Mon 10 Aug 2015, 13:31
Posts: 1
Hi Wizou,

Here is my XML file:
<?xml version="1.0" encoding="utf-8"?>
<project name="Production" xmlns="http://nant.sf.net/release/0.90/nant.xsd>
<property name="database.name" value="HUBServer"/>
</project>


Here is my code to update above XML file
nsisXML::create
nsisXML::load ${ConfigFile}
nsisXML::select "/project/property[@name='${Name}']"
nsisXML::setAttribute "value" ${Value}
nsisXML::save ${ConfigFile}

The above code is working fine for me, if the XML file doesn't contain XMLNS.

But the above XML file contains XMLNS. So that I couldn't update that file.

Could you please help me to fix the above issue.

Thanks in Advance,
Raja


Top
 Profile  
 
 Post subject: Re: issue in update a property value in XML
PostPosted: Mon 28 Sep 2015, 21:42 
Offline
Site Admin

Joined: Sat 06 Aug 2005, 16:35
Posts: 719
Try this:
<project name="Production" xmlns="http://nant.sf.net/release/0.90/nant.xsd" xmlns:myns="http://nant.sf.net/release/0.90/nant.xsd">

and then:
nsisXML::select "/myns:project/property[@name='${Name}']"

_________________
Le site Web de Wizou: http://wizou.fr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group