<?xml version="1.0" ?>
<FDXRateRequest >
<RequestHeader>
<CustomerTransactionIdenti
fier>ewrer
ewr</Custo
merTransac
tionIdenti
fier>
<AccountNumber>4532434324<
/AccountNu
mber>
<MeterNumber>34343434</Met
erNumber>
<CarrierCode>dfdfdsfd</Car
rierCode>
</RequestHeader>
<ShipDate>2004-03-24</Ship
Date>
<DropoffType>REGULARPICKUP
</DropoffT
ype>
<Service>STANDARDOVERNIGHT
</Service>
<Packaging>FEDEXBOX</Packa
ging>
<WeightUnits>LBS</WeightUn
its>
<Weight>5.10</Weight>
<OriginAddress>
<Line1>ererewrewreDr</Line
1>
<Line2>Ste 567</Line2>
<City>Indianapolis</City>
<StateOrProvinceCode>IN</S
tateOrProv
inceCode>
<PostalCode>462292014</Pos
talCode>
<CountryCode>US</CountryCo
de>
</OriginAddress>
<DestinationAddress>
<Line1>Address1</Line1>
<Line2>Address2</Line2>
<City>SomeCity</City>
<StateOrProvinceCode>SS</S
tateOrProv
inceCode>
<PostalCode>55555</PostalC
ode>
<CountryCode>US</CountryCo
de>
</DestinationAddress>
<Payment>
<PayorType>CREDITCARD</Pay
orType>
<Payor>
<AccountNumber>534657676</
AccountNum
ber>
<CountryCode>US</CountryCo
de>
</Payor>
<CreditCard>
<Number>54353D5435435</Num
ber>
<Type>VISA</Type>
<ExpirationDate>0705</Expi
rationDate
>
</CreditCard>
</Payment>
<Dimensions>
<Length>4</Length>
<Width>4</Width>
<Height>5</Height>
<Units>IN</Units>
</Dimensions>
<DeclaredValue>
<Value>50.00</Value>
<CurrencyCode>USA</Currenc
yCode>
</DeclaredValue>
<SpecialServices>
</SpecialServices>
<HomeDelivery>
</HomeDelivery>
<PackageCount>1</PackageCo
unt>
<VariableHandlingCharges>
</VariableHandlingCharges>
<International>
</International>
</FDXRateRequest >
I wanted to change the "address1" value to something else.
is this correct way of doing this. i am new to DOM
// load xml doc
xmldoc = new ActiveXObject("Microsoft.X
MLDOM")
xmldoc.async=false
xmldoc.load("FedexShipRequ
est.xml")
alert(xmldoc)
rootNode = xmldoc.documentElement
<!-- Set Destination Shipping Address -->
address = rootNode.getElementsByTagN
ame("Desti
nationAddr
ess")
address1 = address(0).firstChild
alert(address1.firstChild.
nodeValue)
<!-- Address 1 Required -->
address1.firstChild.nodeVa
lue = street1
alert(address1.firstChild.
nodeValue)
alert(address(0).firstChil
d.nodeValu
e)
<!-- Address 2 Optional -->
address2 = address(0).firstChild.next
Sibling
alert(address2.firstChild.
nodeValue)
address2.firstChild.nodeVa
lue = street2
alert(address2.firstChild.
nodeValue)
alert("Line2" + address(0).firstChild.node
Value)
Thank you