Avatar of satmisha
satmisha
Flag 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..................................!!!!!
XMLVisual Basic.NET

Avatar of undefined
Last Comment
satmisha

8/22/2022 - Mon
satmisha

ASKER
Pls Help Experts
kaufmed

Can you use LINQ?
satmisha

ASKER
currently I am using vs 2008, So I can use LINQ as well.... Looking forward to hearing from you.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
kaufmed

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
satmisha

ASKER
Thankx Expert, Apologies for late response..!!