sample xml file part
<?xml version="1.0" encoding="UTF-8"?><ContractWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _LoadId="export_AJ6iAFmh+pQHq1" xsi:noNamespaceSchemaLocation="ContractWorkspace.xsd">
<_LocalId>CW2218471</_LocalId>
<Active>true</Active>
<ActualTemplateObject _LoadId="export_AJ6iAFmhclFKgb" _Logical="true" class="ariba.collaborate.contracts.ContractWorkspace" ref="true">
<Workspace>/Templates/Contract Templates/Contract Workspace Professional/OPE Workflow#3/</Workspace>
</ActualTemplateObject>
<AgreementPath>/tsoqrqut.4w25m5i</AgreementPath>
<Alert>Gray</Alert>
<AllowAdhocSpend>false</AllowAdhocSpend>
<Amount>$15,000.00 USD</Amount>
Hi ,
I want to search for "ContractWorkspace.xsd" in the in the first line of the xml file and print the value "CW2218471" from the tag <_LocalId> along with value "True" separated by comma delimiter. If ContractWorkspace.xsd does not exist in the first line of the xml file , I want to still print whatever value exists in corresponding <_LocalId> tag along with value "False" separated by comma delimiter. Can you please help me?
for eg: sample output expected if a match is found for string "ContractWorkspace.xsd" in the first line of xml file
=> CW2218471,True
sample output expected if a match is not found for string "ContractWorkspace.xsd" in the first line of xml file
=> value from <_LocalId> tag ,False