StreamReader sr = new StreamReader(Server.MapPath("ParkXML/" + Request.QueryString["tickArr"].ToString() + ".xml"), System.Text.Encoding.Default);
                    String strXml = sr.ReadToEnd();
                    sr.Close();  
                    strXml.Replace("$parkname$", parkname);  //这里面的replace全都没有效果代替不了
                    strXml.Replace("$name$", name);
                    strXml.Replace("$dt$", dt);
                    strXml.Replace("$ticketCount[0]$", ticketCount[0]);
                    strXml.Replace("$ticketCount[1]$", ticketCount[1]);
                    strXml.Replace("$ticketCount[2]$", ticketCount[2]);
                    strXml.Replace("$ticketCount[3]$", ticketCount[3]);
                    strXml.Replace("$ticketCount[4]$", ticketCount[4]);
                    strXml.Replace("$ticketCount[5]$", ticketCount[5]);
                    strXml.Replace("$childTicketCount[0]$", childTicketCount[0]);
                    strXml.Replace("$childTicketCount[1]$", childTicketCount[1]);
                    strXml.Replace("$childTicketCount[2]$", childTicketCount[2]);
                    strXml.Replace("$childTicketCount[3]$", childTicketCount[3]);
                    strXml.Replace("$childTicketCount[4]$", childTicketCount[4]);
                    strXml.Replace("$childTicketCount[5]$", childTicketCount[5]);
                    strXml.Replace("$parkOrderID$", parkOrderID);
                    strXml.Replace("$checkCode$", checkCode);                    //打印内容
                    Response.Write(strXml);-------------------
xml文件
<?xml version="1.0" encoding="utf-8" ?><root><pagesetting><Landscape>false</Landscape><paperkind>A4</paperkind><paperwidth>1512</paperwidth><paperheight>2088</paperheight><pageleft>0</pageleft><pageright>0</pageright><pagetop>0</pagetop><pagebottom>0</pagebottom></pagesetting><barCode><barX_1>400</barX_1><barY_1>200</barY_1><barX_2>400</barX_2><barY_2>600</barY_2><barX_3>400</barX_3><barY_3>800</barY_3><barWidth>200</barWidth><barHeight>100</barHeight><Code>031523</Code><CodeFont>Bar Code 39 f HR</CodeFont><CodeSize>26</CodeSize></barCode><Note><Text>说明测试宋体12px位置X=100 Y=150 W=200 H=100</Text><TextFont>宋体</TextFont><TextSize>12</TextSize><TextWidth>200</TextWidth><TextHeight>100</TextHeight><TextX>50</TextX><TextY>100</TextY></Note><reporttable><table x="41" y="0" border="0" bordercolor="Black" maxlines="1150"><tablehead></tablehead><tablebody>  <tr height='40'>
    <td colspan='3' align='center' fontname='宋体' fontsize='24'>$parkname$</td>   
  </tr>
  <tr>
    <td align='right' width='30%'>宾客姓名</td>
    <td width='20%'>$name$</td>
<td></td>
    
  </tr>
  <tr>
    <td align='right' width='30%'>门票项目</td>
    <td width='20%'>$parkname$</td>
<td></td>
    
  </tr>
  <tr>
    <td align='right' width='30%'>有效期</td>
    <td width='20%'>$dt$</td>
    <td>
        
    </td>
  </tr>
  <tr height='25'>
    <td align='right' width='30%'>购票数量</td>
  </tr>
  <tr height='25' width='50%'>
    <td align='right' width='30%'>单日成人票</td>
$ticketCount[0]$
    <td width='20'>$ticketCount[1]$</td>
    <td width='20'>$ticketCount[2]$</td>
    <td width='20'>$ticketCount[3]$</td>
    <td width='20'>$ticketCount[4]$</td>
    <td width='20'>$ticketCount[5]$</td>
  </tr>
  <tr height='25'>
    <td align='right' width='30%'>单日儿童票</td>
    $childTicketCount[0]$
    <td width='20'>$childTicketCount[1]$</td>
    <td width='20'>$childTicketCount[2]$</td>
    <td width='20'>$childTicketCount[3]$</td>
    <td width='20'>$childTicketCount[4]$</td>
    <td width='20'>$childTicketCount[5]$</td>
    <td width='100' align='right'>票号:</td><td width='50'>$parkOrderID$</td><td width='100' align='right'>验证码</td><td>$checkCode$</td>

  </tr>
  <tr>
  <td align='center'>备注:1.1米以下小童免费</td>
  </tr>
  <tr>  
<td align='right' width='80%' fontname='宋体' fontsize='10'>$parkname$保存</td>
  </tr>
</tablebody><tablefoot></tablefoot></table></reporttable></root>