2 Replies Latest reply on Nov 2, 2006 11:58 AM by xscan

    XML file creation

    purna1
      I am trying to write XML file from xPath with corresponding values from database. Below are the part of xpath's and values in 1. I am trying to write as XML file with this format in 2(this is part of file). Could any please tell me how to write this file?


      1)
      ReturnDataState/FEIN
      ReturnDataState/NameControl
      ReturnDataState/OriginalSubmissionID
      ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/AddressLine1
      ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/AddressLine2
      ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/City
      ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/State
      ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/ZIPCode
      ReturnDataState/BusinessEntity/Header/HdrAddress/AddressChange
      ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/AddressLi ne1
      ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/AddressLi ne2
      ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/City
      ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/State
      ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/ZIPCode
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/AmendedReturnIndicator
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/AttachmentFiledIndicator 0
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/CalendarYearFilerIndicator
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/DebtIndicator
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120AIndicator 0
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120HIndicator 0
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120Indicator 1
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120SIndicator 0
      ReturnDataState/BusinessEntity/Header/HdrCheckBox/FedConsIndicator 0


      2)
      <?xml version="1.0" encoding="UTF-8"?>
      <ReturnDataState>
      <FEIN></FEIN>
      <NameControl></NameControl>
      <OriginalSubmissionID></OriginalSubmissionID>
      <BusinessEntity>
      <Header>
      <HdrAddress>
      <Address>
      <USAddress>
      <AddressLine1></AddressLine1>
      <AddressLine2></AddressLine2>
      <City></City>
      <State></State>
      <ZIPCode></ZIPCode>
      </USAddress>
      </Address>
      <AddressChange></AddressChange>
      <StateOfIncorporation>
      <USAddress>
      <AddressLine1></AddressLine1>
      <AddressLine2></AddressLine2>
      <City></City>
      <State></State>
      <ZIPCode></ZIPCode>
      </USAddress>
      </StateOfIncorporation>
      </HdrAddress>
      <HdrCheckBox>
      <AmendedReturnIndicator></AmendedReturnIndicator>
      <AttachmentFiledIndicator>0</AttachmentFiledIndicator>
      <CalendarYearFilerIndicator></CalendarYearFilerIndicator>
      <DebtIndicator></DebtIndicator>
      <Fed1120AIndicator>0</Fed1120AIndicator>
      <Fed1120HIndicator>0</Fed1120HIndicator>
      <Fed1120Indicator>1</Fed1120Indicator>
      <Fed1120SIndicator>0</Fed1120SIndicator>
      <FedConsIndicator>0</FedConsIndicator>