From: vkr2010 rangavajhala on 20 Jul 2010 17:48 how do i edit the xml file so that it uses the value of r? idea is to be able to make this a function with a stack of xml files for which a childnode in all the files has to be changed with new value of r r=25; xDoc = xmlread(fullfile('sample2.xml')) allListItems = xDoc.getElementsByTagName('region'); qtssao=allListItems.getLength; thisListItem=allListItems.item(qtssao-1) childNode = thisListItem.getFirstChild.getData; thisListItem.getFirstChild.setData('25'); xmlwrite('sample2.xml',xDoc); thanks in advance, vkr
From: Donn Shull on 21 Jul 2010 02:43 "vkr2010 rangavajhala" <vamsee(a)sjm.com> wrote in message <i255ik$k87$1(a)fred.mathworks.com>... > how do i edit the xml file so that it uses the value of r? > idea is to be able to make this a function with a stack of xml files for which a childnode in all the files has to be changed with new value of r > > > r=25; > xDoc = xmlread(fullfile('sample2.xml')) > allListItems = xDoc.getElementsByTagName('region'); > qtssao=allListItems.getLength; > thisListItem=allListItems.item(qtssao-1) > childNode = thisListItem.getFirstChild.getData; > thisListItem.getFirstChild.setData('25'); > xmlwrite('sample2.xml',xDoc); > > thanks in advance, > vkr thisListItem.getFirstChild.setData(num2str(r));
From: vkr2010 rangavajhala on 21 Jul 2010 10:42 "Donn Shull" <donn.shull.no_spam(a)aetoolbox.com> wrote in message <i264tr$8lc$1(a)fred.mathworks.com>... > "vkr2010 rangavajhala" <vamsee(a)sjm.com> wrote in message <i255ik$k87$1(a)fred.mathworks.com>... > > how do i edit the xml file so that it uses the value of r? > > idea is to be able to make this a function with a stack of xml files for which a childnode in all the files has to be changed with new value of r > > > > > > r=25; > > xDoc = xmlread(fullfile('sample2.xml')) > > allListItems = xDoc.getElementsByTagName('region'); > > qtssao=allListItems.getLength; > > thisListItem=allListItems.item(qtssao-1) > > childNode = thisListItem.getFirstChild.getData; > > thisListItem.getFirstChild.setData('25'); > > xmlwrite('sample2.xml',xDoc); > > > > thanks in advance, > > vkr > > > thisListItem.getFirstChild.setData(num2str(r)); Thanks a ton!!!!
|
Pages: 1 Prev: disable TeX parsing for axes titles Next: Multivariate minimization with constraints |