Link to home
Get AccessLog in
Avatar of satmisha
satmishaFlag for India

asked on

Reading/Writting to an XML File

Hi Expert,

1. Need to Read & Write to an XML

2. Need to change Values from the following tags:
   <MsgNm>MaintainGNAApplicationDetailRequest</MsgNm>
   <MsgFormatCd>XML</MsgFormatCd>
   <MsgMajVersionNbr>2</MsgMajVersionNbr>
   <MsgMinVersionNbr>1</MsgMinVersionNbr>

Open in new window

3. Need to Change Following Tag value from 'String' value to 'Jim':
<Response>
   <Status>
    <RespCd>String</RespCd>
    <RespDesc>String</RespDesc>
    <ExplCd>String</ExplCd>
    <ExplDesc>String</ExplDesc>
   </Status>
   <CICAOutputData/>
  </Response>

Open in new window

==========

Enclosing complete XML:
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
<Envelope envelopeId="EMI" majorVersion="1" minorVersion="4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Z:\FRAUDD~2\260412\MAINTA~1.XSD">
 <Header>
  <TransactionBlk actor="Next" mustUnderstand="1" name="StdTransBlk" majorVersion="1" minorVersion="2">
   
   <MsgNm>MaintainGNAApplicationDetailRequest</MsgNm>
   <MsgFormatCd>XML</MsgFormatCd>
   <MsgMajVersionNbr>2</MsgMajVersionNbr>
   <MsgMinVersionNbr>1</MsgMinVersionNbr>
   
  </TransactionBlk>
  <SecurityBlk name="StdSecurityBlk" majorVersion="1" minorVersion="1" actor="Next" mustUnderstand="1">
   <SAMLBlk>
    <Assertion MajorVersion="1" MinorVersion="0" AssertionID="" Issuer="urn:aexp.com:applName" IssueInstant="2008-02-22T09:30:47.0Z">
     <AttributeStatement>
      <Subject>
       <NameIdentifier NameQualifier="urn:aexp.com:security" Format="urn:aexp.com:security:racf"/>
      </Subject>
      <Attribute AttributeName="" AttributeNamespace="">
       <AttributeValue/>
      </Attribute>
     </AttributeStatement>
    </Assertion>
   </SAMLBlk>
  </SecurityBlk>
 </Header>
 <Body>
  <Request>
   <BasicGrp>
    <PCNGrp>
     <PCNIssueDt>04\2011</PCNIssueDt>
     
    </PCNGrp>
    <SuppGrp>
     <SuppNbr>123</SuppNbr>
     <PersonelInfoGrp>
      
      <CustBirthDt>1976/02/28</CustBirthDt>
     </PersonelInfoGrp>
     <CustinfoGrp>
      
      <Billind>Y</Billind>
     </CustinfoGrp>
     <CompanyInfoGrp>
      <CompanyNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CompanyNm>
     </CompanyInfoGrp>
     <EmploymentInfoGrp>
      <EmployerNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</EmployerNm>
     </EmploymentInfoGrp>
     <AddrInfoGrp>
      <AddrTypeCd>AA</AddrTypeCd>
      
      <IPAddr>123456789012345</IPAddr>
     </AddrInfoGrp>
     <AddrInfoGrp>
      <AddrTypeCd>AA</AddrTypeCd>
      
      <IPAddr>123456789012345</IPAddr>
     </AddrInfoGrp>
     <AppDecGrp>
      
      <FinalDecRsnCd5>XX</FinalDecRsnCd5>
     </AppDecGrp>
     <PhoneGrp>
      
      <ExtnNbr>1234567</ExtnNbr>
     </PhoneGrp>
     <PhoneGrp>
      
      <ExtnNbr>1234567</ExtnNbr>
     </PhoneGrp>
     <CIPGrp>
      <TaxID>123456789012345678</TaxID>
     </CIPGrp>
     <BalTrfrGrp>
      
      <BalTrfrAcct4>12345678901234567890</BalTrfrAcct4>
     </BalTrfrGrp>
    </SuppGrp>
    <SuppGrp>
     <SuppNbr>123</SuppNbr>
     <PersonelInfoGrp>
      <SfxNm>XXXXXXXXXXXXXXXXXXXX</SfxNm>
      <LstNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</LstNm>
      <FirstNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</FirstNm>
      <MidNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</MidNm>
      <CustBirthDt>1976/02/28</CustBirthDt>
     </PersonelInfoGrp>
     <CustinfoGrp>
      <CustIdTypeCd>ABCDEFG</CustIdTypeCd>
      <CustId>ABCDEFGHIJKLMNOPQR</CustId>
      <AffiliateId>ABCDEFGHIJK</AffiliateId>
      <AcctNum>1234567890123456789</AcctNum>
      <Billind>Y</Billind>
     </CustinfoGrp>
     <CompanyInfoGrp>
      <CompanyNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CompanyNm>
     </CompanyInfoGrp>
     <EmploymentInfoGrp>
      <EmployerNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</EmployerNm>
     </EmploymentInfoGrp>
     <AddrInfoGrp>
      <AddrTypeCd>AA</AddrTypeCd>
      <AddrStrLine1>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine1>
      <AddrStrLine2>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine2>
      <AddrStrLine3>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine3>
      <AddrStrLine4>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine4>
      <CityNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CityNm>
      <CntryRegnCd>APA</CntryRegnCd>
      <CntryCd>IND</CntryCd>
      <ZipCd>XXXXXXXXXXXXXXX</ZipCd>
      <EmailAddrTxt>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@axp.com</EmailAddrTxt>
      <IPAddr>123456789012345</IPAddr>
     </AddrInfoGrp>
     <AddrInfoGrp>
      <AddrTypeCd>AA</AddrTypeCd>
      <AddrStrLine1>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine1>
      <AddrStrLine2>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine2>
      <AddrStrLine3>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine3>
      <AddrStrLine4>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AddrStrLine4>
      <CityNm>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CityNm>
      <CntryRegnCd>APA</CntryRegnCd>
      <CntryCd>IND</CntryCd>
      <ZipCd>XXXXXXXXXXXXXXX</ZipCd>
      <EmailAddrTxt>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@axp.com</EmailAddrTxt>
      <IPAddr>123456789012345</IPAddr>
     </AddrInfoGrp>
     <AppDecGrp>
      <AppStatus>A</AppStatus>
      <FinalDecRsnCd1>XX</FinalDecRsnCd1>
      <FinalDecRsnCd2>XX</FinalDecRsnCd2>
      <FinalDecRsnCd3>XX</FinalDecRsnCd3>
      <FinalDecRsnCd4>XX</FinalDecRsnCd4>
      <FinalDecRsnCd5>XX</FinalDecRsnCd5>
     </AppDecGrp>
     <PhoneGrp>
      <TypeCd>A</TypeCd>
      <TypeSeqno>123</TypeSeqno>
      <ContctCd>1</ContctCd>
      <CntryNbr>123</CntryNbr>
      <LineNbr>123456789012345</LineNbr>
      <ExtnNbr>1234567</ExtnNbr>
     </PhoneGrp>
     <PhoneGrp>
      <TypeCd>A</TypeCd>
      <TypeSeqno>123</TypeSeqno>
      <ContctCd>1</ContctCd>
      <CntryNbr>123</CntryNbr>
      <LineNbr>123456789012345</LineNbr>
      <ExtnNbr>1234567</ExtnNbr>
     </PhoneGrp>
     <CIPGrp>
      <TaxID>123456789012345678</TaxID>
     </CIPGrp>
     <BalTrfrGrp>
      <BalTrfrAcct1>12345678901234567890</BalTrfrAcct1>
      <BalTrfrAcct2>12345678901234567890</BalTrfrAcct2>
      <BalTrfrAcct3>12345678901234567890</BalTrfrAcct3>
      <BalTrfrAcct4>12345678901234567890</BalTrfrAcct4>
     </BalTrfrGrp>
    </SuppGrp>
   </BasicGrp>
  </Request>
  <Response>
   <Status>
    <RespCd>String</RespCd>
    <RespDesc>String</RespDesc>
    <ExplCd>String</ExplCd>
    <ExplDesc>String</ExplDesc>
   </Status>
   <CICAOutputData/>
  </Response>
 </Body>
</Envelope>

Open in new window


Please Help..................................!!!!!
Avatar of satmisha
satmisha
Flag of India image

ASKER

Pls Help Experts
Avatar of kaufmed
Can you use LINQ?
currently I am using vs 2008, So I can use LINQ as well.... Looking forward to hearing from you.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
Thankx Expert, Apologies for late response..!!