Hpricot usage

can anybody tell me how to write to a xml document using hpricot? Is it
possible to do that? Here is my xml in which i want to change the
ordernumber everytime i run my script.

<Order DocumentType="786" Action="doofus" EnterpriseCode="sibs"
  SellerOrganizationCode="VENDOR" BuyerOrganizationCode="hp"
  OrderNo="CG1XYAA3" OrderType="Regular" Currency="USD"
  OrderDate="20060408" VendorID="000002895">
  <OrderLines>
    <OrderLine OrderedQty="20" ReqDeliveryDate="20060428" >
      <Item ItemID="4405540021115" UnitOfMeasure="EACH"/>
    </OrderLine>
  </OrderLines>
  <Interface CorpPOStatus="ACTIVE"/>
</Order>

···

--
Posted via http://www.ruby-forum.com/.

hpricot really is just a parsing library for HTML or XML.

For writing out XML, you should look into libxml-ruby or even just
REXML if you don't want an external dependency.

Jason

···

On Mon, Aug 4, 2008 at 4:51 PM, Archana Madduru <archi_urs2003@yahoo.com> wrote:

can anybody tell me how to write to a xml document using hpricot? Is it
possible to do that? Here is my xml in which i want to change the
ordernumber everytime i run my script.

<Order DocumentType="786" Action="doofus" EnterpriseCode="sibs"
SellerOrganizationCode="VENDOR" BuyerOrganizationCode="hp"
OrderNo="CG1XYAA3" OrderType="Regular" Currency="USD"
OrderDate="20060408" VendorID="000002895">
<OrderLines>
   <OrderLine OrderedQty="20" ReqDeliveryDate="20060428" >
     <Item ItemID="4405540021115" UnitOfMeasure="EACH"/>
   </OrderLine>
</OrderLines>
<Interface CorpPOStatus="ACTIVE"/>
</Order>
--
Posted via http://www.ruby-forum.com/\.