Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
hpricot usage
Archana Madduru
8/4/2008 8:52:00 PM
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-...
.
1 Answer
Jason Roelofs
8/4/2008 9:11:00 PM
0
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-...
.
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
hpricot usage
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password