How to pass the parameter in xml file in UNIX shell script?

Hi,
I have an XML file like the following...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar" STOP_ON_ERROR_FLAG="true">
<ETL_START PERIOD="May 2008" />
</IMPORT_JOBSET>
</ONDEMAND_JOB>

My requirement is
1) Create the above XML file from Unix Shell Script.
2) Pass the CALENDAR value as parameter from unix script.

Only the value for CALENDAR will change from Main Monthly Calendar to Main Weekly Calendar Main Bi-Weekly Calendar

Your example does not seem to be valid xml. Anyway, assuming it is just a typo what exactly do you have to pass to the process? Something to read from stdin like a stream or file, an environment variable or simply the xml string as a parameter?

I'm guessing xml string : if you flatten the xml string to one line which will not change the meaning of the contents at all - I do not know etl that well so here is a nonsense example:

etl '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ONDEMAND_JOB VERSION="5.1" LOCALE="en_US"><IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar" STOP_ON_ERROR_FLAG="true"><ETL_START PERIOD="May 2008" /></IMPORT_JOBSET></ONDEMAND_JOB>'

Note the starting and terminating single quotes - otherwise the shell will try to interpret the xml with bad results.

You posted this here before and it was closed as homework.

I will give you a chance to explain before closing this one, but you'd better do so.

Is this homework?

actually I need to know how to pass the unix parameter in the XML file?

echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="$CALENDAR" STOP_ON_ERROR_FLAG="true">
<ETL_START PERIOD="May 2008" />
</IMPORT_JOBSET>
</ONDEMAND_JOB>' > filename.xml

Will the filename.xml be created in the above way?
How to pass this $CALENDAR value?