I want to form new xml file using batch file

May 11, 2017 at 00:11:58
Specs: Windows 10
I want to create the same xml file below and needs to pass the dynamically variable for filter condition
<?xml version="1.0" encoding="UTF-8"?>
<quer:query productCode="RC1502" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Application" locale="en" mode="CSV" csvheader="true" csvdelimiter="," csvquote=""" largegraph="true" preventDuplicates="false" xmlns:quer="http://www.taleo.com/ws/integration/query"><quer:subQueries/><quer:projections><quer:projection alias="CandidateId"><quer:field path="Candidate,Number"/></quer:projection><quer:projection alias="Requisition"><quer:field path="Requisition,ContestNumber"/></quer:projection><quer:projection alias="CurrentStep"><quer:field path="CSWLatestStep,Mnemonic"/></quer:projection><quer:projection alias="CurrentStatus"><quer:field path="CSWLatestStatus,Mnemonic"/></quer:projection></quer:projections><quer:projectionFilterings/><quer:filterings><quer:filtering>
<quer:includedIn>
<quer:field path="Candidate,Number"/>
<quer:list>
<quer:string>GBL_SEND_READY2PPLSFT</quer:string>
<quer:string>GBL_SENT_2PPLSFT</quer:string>
</quer:list>
</quer:includedIn>
</quer:filtering><quer:filtering>
<quer:includedIn>
<quer:field path="Requisition,ContestNumber"/>
<quer:list>
<quer:string>GBL_SEND_READY2PPLSFT</quer:string>
<quer:string>GBL_SENT_2PPLSFT</quer:string>
</quer:list>
</quer:includedIn>
</quer:filtering></quer:filterings><quer:sortings/><quer:sortingFilterings/><quer:groupings/><quer:joinings/></quer:query>

See More: I want to form new xml file using batch file

Report •

#1
May 11, 2017 at 01:38:21
Writing xml with batch is a mess.
You'll probably need VBS or other script.
2017-05-11 15:38:13.34 GMT +7

=====================

M2 Get custom script or take private lessons

message edited by Mechanix2Go


Report •

#2
May 11, 2017 at 22:17:55
these are the targets you want to replace?
<quer:string>GBL_SEND_READY2PPLSFT</quer:string>
<quer:string>GBL_SENT_2PPLSFT</quer:string>

Yeah, batch is a pain. vbs or powershell. Especially if no car-ret/linefeeds, batch will be struggling, at best, and may not be dependable even if it does work once.

message edited by nbrane


Report •

#3
May 12, 2017 at 01:51:06
<?xml version="1.0"?>
<package-info>
<package data="%package%">
<package-ver data="%package-ver%">
<package-url data="%package-url%">
</package-info>

Report •
Related Solutions


Ask Question