05-01-2013, 04:37 PM
Ok one more. The following only find the first node. I see there is an allMatching parameter but could not get it to work. How would you be able to get all of the <app-value> values to be capitalized?
Macro xmltest2
Macro xmltest2
str s=
;<?xml version="1.0" encoding="UTF-8"?>
;<domains xmlns="http://www.intervoice.com/schema/property/3.0">
;;;<audit savedby="IC Translate Table" timestamp="Mon Dec 31 18:19:45 IST 2012" version="3.0.0.0"/>
;;;<domain allow-add="false" displayable="true" domain-type="TT" id="" preprocessor="application/ecmascript">
;;;;<description value="This IC Translate Table has to be used for configuraing various application level properties."/>
;;;'<display-name value="setup.tt"/>
;;;:<property key="transferSpanish">
;;;;;<app-value value="false"/>
;;;;;;<description value="Property that indicates whether a caller should be transferred immediately upon selecting Spanish at language selection."/>
;;;;</property>
;;;;<property key="playBroadcast">
;;;;;<app-value value="false"/>
;;;;;;<description value="property that indicates whether to play broadcast message or not at the starting."/>
;;;;</property>
;;;;<property key="broadcastMessages">
;;;;;<app-value value="'YV_000'"/>
;;;;;;<description value="Property that indicates which broadcast audio file will be played; 000 gets replaced with the bank code (Citi, HSBC, etc)"/>
;;;;</property>
;;;;<property key="broadcastMsgDirectory">
;;;;;<app-value value="'d:\\Intervoice\\Tomcat\\webapps\\WebAudio\\resources\\audio\\en-US\\default\\'"/>
;;;;;;<description value="Property to indicate what is the location of bradcast message file. This property will be used by jsp file in Your Voice feature."/>
;;;;</property>
;;;;<property key="startMainMenu">
;;;;;<app-value value="true"/>
;;;;;;;<description value="Property which indicates whether to play the Main Menu to caller or not. If it is set to true then Main Menu will be played otherwise it will be skipped and call will directly go for login."/>
;;;;</property>
;;;</domain>
;/<domains>
IXml x._create
x.FromString(s)
ARRAY(IXmlNode) a
x.Path("domains/domain/property/app-value" a)
int i
for i 0 a.len
,
,IXmlNode attr=a[i].Attribute("value")
,str s2=attr.Value
,s2.ucase
,attr.Value=s2
x.ToString(s)
out s