Convert xml to excel/csv

Please help me in converting XML file into excel/csv.

Thank you in advance.

Convert XML into a dataframe, and then export it into XLSX.

https://pandas.pydata.org/docs/reference/api/pandas.read_xml.html

3 Likes

I’ve tried using this, but for some reason, it is not working. Can you help me with this? I’m new to this. How can I send the XML file to you?

It would be better to show us the code you’re using first, and a
transcript of the error messages.

Remember to paste code and transcripts inline as text between triple
backticks:

 ```
 your code
 or output
 goes here
 ```

Screenshots are far less useful.

Cheers,
Cameron Simpson cs@cskk.id.au

4 Likes

This is what I did. However, some information is not coming and the required output is not being generated.

# Program to convert an xml
# file to json file

# import json module and xmltodict
# module provided by python

import xmltodict
import pandas as pd


# open the input xml file and read data in form of python dictionary using xmltodict module
with open(r"path\datasets.xml") as xml_file:
   
   data_dict = xmltodict.parse(xml_file.read())
   # xml_file.close()
   # df=pd.DataFrame()
   df=pd.json_normalize(data_dict)
   df.to_csv('data.csv')

   # generate the object using json.dumps()
   # corresponding to json data
   
   # json_data = json.dumps(data_dict)
   
   # # Write the json data to output
   # # json file
   # with open("data.json", "w") as json_file:
   # 	json_file.write(json_data)
   # 	# json_file.close()

Is there any particular reason why you did not use the native way of parsing XML files that pandas provides? How do your XML and your dataframe look like?

Dataframe assignment and exporting should be done outside of context manager indentation.

No specific reason. It’s just that I’m not sure how to use it.

I linked the documentation link above.

This is how my XML file look like:-

b’<xfa:datasets xmlns:xfa=“http://www.xfa.org/schema/xfa-data/1.0/”>xfa:data<frm:FormSchV_Dtls xmlns:frm=“http://www.mit.gov.in/eGov/BackOffice/schema/Form”>frm:FormSchVfrm:AuthCapital100000.0</frm:AuthCapital>frm:CINU74140DL2004PTC128960</frm:CIN>frm:CmpnyAddress<cdt:AddressLn xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>cdt:FirstLine9, CSC, DDA MARKET, A-BLOCK</cdt:FirstLine>cdt:SecondLineSARASWATI VIHAR</cdt:SecondLine></cdt:AddressLn><cdt:City xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>DELHI</cdt:City><cdt:State xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>DL</cdt:State><cdt:Country xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>INDIA</cdt:Country><cdt:Pincode xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>110034</cdt:Pincode><cdt:Email xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>vwcpl@yahoo.com</cdt:Email></frm:CmpnyAddress>frm:WhetherListedNO</frm:WhetherListed>frm:FnclYrEndDt2008-03-31</frm:FnclYrEndDt>frm:AGMHeldYES</frm:AGMHeld>frm:AGMDate2008-09-16</frm:AGMDate>frm:DueAGMDate2008-09-30</frm:DueAGMDate>frm:WhetherExtnNO</frm:WhetherExtn>frm:AuthCapOfCmp100000.00</frm:AuthCapOfCmp>frm:AuthNominalAmtPerES10</frm:AuthNominalAmtPerES>frm:AuthCapESN10000.00</frm:AuthCapESN>frm:AuthCapESV100000.00</frm:AuthCapESV>frm:AuthCapPSN0.00</frm:AuthCapPSN>frm:AuthCapUCSN0.00</frm:AuthCapUCSN>frm:IssuedCapOfCmp100000.00</frm:IssuedCapOfCmp>frm:IssuedNominalAmtPerES10</frm:IssuedNominalAmtPerES>frm:IssuedCapESN10000.00</frm:IssuedCapESN>frm:IssuedCapESV100000.00</frm:IssuedCapESV>frm:IssuedCapPSN0.00</frm:IssuedCapPSN>frm:SubsCapOfCmp100000.00</frm:SubsCapOfCmp>frm:SubsNominalAmtPerES10</frm:SubsNominalAmtPerES>frm:SubsCapESN10000.00</frm:SubsCapESN>frm:SubsCapESV100000.00</frm:SubsCapESV>frm:SubsCapPSN0.00</frm:SubsCapPSN>frm:PaidupCapOfCmp100000.00</frm:PaidupCapOfCmp>frm:PaidupNominalAmtPerES10</frm:PaidupNominalAmtPerES>frm:PaidupCapESN10000.00</frm:PaidupCapESN>frm:PaidupCapESV100000.00</frm:PaidupCapESV>frm:PaidupCapPSN0.00</frm:PaidupCapPSN>frm:TotalDevntrOfCmp0.00</frm:TotalDevntrOfCmp>frm:NonConvDebNum0.00</frm:NonConvDebNum>frm:PartlyConvDebNum0.00</frm:PartlyConvDebNum>frm:FullyConvDebNum0.00</frm:FullyConvDebNum>frm:IndbtAmt0.00</frm:IndbtAmt>frm:CntrlStGovt0.00</frm:CntrlStGovt>frm:GovtCmp0.00</frm:GovtCmp>frm:PubFinCmp0.00</frm:PubFinCmp>frm:NtnOthBnk0.00</frm:NtnOthBnk>frm:MutFunds0.00</frm:MutFunds>frm:VenCap0.00</frm:VenCap>frm:FrgnHld0.00</frm:FrgnHld>frm:BodCorp0.00</frm:BodCorp>frm:DirRelDir100.00</frm:DirRelDir>frm:Oth50ShHld0.00</frm:Oth50ShHld>frm:Others0.00</frm:Others>frm:TtlNoShrHld2</frm:TtlNoShrHld>frm:NoMDirOrDir2</frm:NoMDirOrDir>frm:DetailsOfMGSecorManInfofrm:DetailsOfMGSecorManager<cdt:DINorPAN xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>00662584</cdt:DINorPAN><cdt:PersonFullName xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>VEERA WASIR</cdt:PersonFullName><cdt:Designation xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>Director</cdt:Designation><cdt:DateOfAppoint xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>2004-09-10</cdt:DateOfAppoint><cdt:NoOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>5000</cdt:NoOfEquityShare><cdt:PercentageOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>50.00000000</cdt:PercentageOfEquityShare><cdt:WhtrSignTheRetrn xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>YES</cdt:WhtrSignTheRetrn><cdt:DateOfSign xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>2008-09-16</cdt:DateOfSign></frm:DetailsOfMGSecorManager>frm:DetailsOfMGSecorManager<cdt:DINorPAN xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>01667486</cdt:DINorPAN><cdt:PersonFullName xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>GURMIT SINGH</cdt:PersonFullName><cdt:Designation xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>Director</cdt:Designation><cdt:DateOfAppoint xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>2004-09-10</cdt:DateOfAppoint><cdt:NoOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>5000</cdt:NoOfEquityShare><cdt:PercentageOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>50.00000000</cdt:PercentageOfEquityShare><cdt:WhtrSignTheRetrn xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>YES</cdt:WhtrSignTheRetrn><cdt:DateOfSign xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>2008-09-16</cdt:DateOfSign></frm:DetailsOfMGSecorManager></frm:DetailsOfMGSecorManInfo>frm:NoMDirOrDirtoCease0</frm:NoMDirOrDirtoCease>frm:DateDeclaration2008-07-29</frm:DateDeclaration>frm:DesignationDIRT</frm:Designation>frm:DINMembrNoNew00662584</frm:DINMembrNoNew>frm:CharteredorCostorCompanyCA</frm:CharteredorCostorCompany>frm:AssociateorFellowASS</frm:AssociateorFellow>frm:MembershipnumberorCertificate504311</frm:MembershipnumberorCertificate>frm:HTFNO</frm:HTF>frm:FormIdFormSchV</frm:FormId>frm:VersionNo9</frm:VersionNo>frm:AttachmentNames2037.pdf,2900.pdf</frm:AttachmentNames>frm:DetailsOMGtoCeaseInfofrm:DetailsOfMGtoCease</frm:DetailsOfMGtoCease>frm:DetailsOfMGtoCease</frm:DetailsOfMGtoCease>frm:DetailsOfMGtoCease</frm:DetailsOfMGtoCease>frm:DetailsOfMGtoCease</frm:DetailsOfMGtoCease></frm:DetailsOMGtoCeaseInfo>frm:WhtrListOfAttachmtYES</frm:WhtrListOfAttachmt>frm:BoardResNo1</frm:BoardResNo></frm:FormSchV><srn:ServiceRequestNumberDetails xmlns:srn=“http://www.mit.gov.in/eGov/BackOffice/schema/SRNDetails”>srn:SRN</srn:SRN>srn:BusinessDate</srn:BusinessDate></srn:ServiceRequestNumberDetails><usr:UserDetails xmlns:usr=“http://www.mit.gov.in/eGov/BackOffice/schema/UserDetails”>usr:UserType</usr:UserType></usr:UserDetails><sig:SignatureDetails xmlns:sig=“http://www.mit.gov.in/eGov/BackOffice/schema/SignatureDetails”>sig:SerialNo</sig:SerialNo>sig:SourceCA</sig:SourceCA></sig:SignatureDetails><HiddenDueDateAGM_Dt_D>2008-09-30</HiddenDueDateAGM_Dt_D><HiddenDateAGMExt_Dt_D></HiddenDateAGMExt_Dt_D><HiddenDateAGM_Dt_D>2008-09-16</HiddenDateAGM_Dt_D><CompanyName_C>VEERA WASIR CONSULTANTS PRIVATE LIMITED</CompanyName_C><HiddenDateAnnualRet_D>2008-03-31</HiddenDateAnnualRet_D>9<NumericField_N>100.00</NumericField_N>U74140DL2004PTC1289602008-09-162008-09-30<HiddenDtOfSigning_D>2008-09-16</HiddenDtOfSigning_D><HiddenDateAppointment_D></HiddenDateAppointment_D><HiddenDateCessation_D></HiddenDateCessation_D><Hidden_L>Annual Return.pdf:2037:List of Shareholders.pdf:2900</Hidden_L><Company_C>VEERA WASIR CONSULTANTS PRIVATE LIMITED</Company_C>PRIVNGOV<Err_C></Err_C><PrescruitnyErr_N>0</PrescruitnyErr_N>2<Pres_Num>5</Pres_Num>1;1;3;[object RDN cn=(n)Code Solutions - A Division of GNFC LTD., c=IN, o=India PKI, ou=(n)Code Solutions CA];[object RDN cn=VEERA WASIR 562242, c=IN, o=(n)Code Solutions CA, ou=Class IIa, Director];Sign1;4176C1B12;2;3;[object RDN cn=Tata Consultancy Services Certifying Authority, c=IN, l=Hyderabad, st=AP, o=India PKI, ou=TCS CA, email=admin@tcs-ca.tcs.co.in];[object RDN cn=Dheeraj Sharma, c=IN, l=New Delhi, st=Delhi, o=Tata Consultancy Services - Certifying Authority, ou=Corporate Professionals - Registration Authority, Individual - Others, Class 2 Certificate, email=mail2ca@gmail.com];Sign2;07D810A101611D2381B229<CheckForm_C>YES</CheckForm_C><CINStatus_N>0</CINStatus_N>NO</frm:FormSchV_Dtls></xfa:data><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“FormSchV_Dtls”><frm:FormSchV_Dtls xmlns:frm=“http://www.mit.gov.in/eGov/BackOffice/schema/Form”>frm:FormSchVfrm:AuthCapital</frm:AuthCapital>frm:CIN</frm:CIN><frm:GLN dd:minOccur=“0” dd:nullType=“exclude”></frm:GLN>frm:CmpnyAddress<cdt:AddressLn xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”>cdt:FirstLine</cdt:FirstLine><cdt:SecondLine dd:minOccur=“0” dd:nullType=“exclude”></cdt:SecondLine></cdt:AddressLn><cdt:City xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:City><cdt:State xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:State><cdt:Country xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Country><cdt:Pincode xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:Pincode><cdt:Telephone xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Telephone><cdt:Fax xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Fax><cdt:Email xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Email></frm:CmpnyAddress><frm:Website dd:minOccur=“0” dd:nullType=“exclude”></frm:Website><frm:WhetherSubcatChng dd:minOccur=“0” dd:nullType=“exclude”></frm:WhetherSubcatChng><frm:NewSubcat dd:minOccur=“0” dd:nullType=“exclude”></frm:NewSubcat>frm:WhetherListed</frm:WhetherListed><frm:StockExCodeA dd:minOccur=“0” dd:nullType=“exclude”></frm:StockExCodeA><frm:StockExCodeB dd:minOccur=“0” dd:nullType=“exclude”></frm:StockExCodeB>frm:FnclYrEndDt</frm:FnclYrEndDt>frm:AGMHeld</frm:AGMHeld><frm:AGMDate dd:minOccur=“0” dd:nullType=“exclude”></frm:AGMDate>frm:DueAGMDate</frm:DueAGMDate>frm:WhetherExtn</frm:WhetherExtn><frm:DueAGMDateExr dd:minOccur=“0” dd:nullType=“exclude”></frm:DueAGMDateExr><frm:AuthCapOfCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthCapOfCmp><frm:AuthNominalAmtPerES dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthNominalAmtPerES><frm:AuthNominalAmtPerPS dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthNominalAmtPerPS>frm:AuthCapESN</frm:AuthCapESN><frm:AuthCapESV dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthCapESV>frm:AuthCapPSN</frm:AuthCapPSN><frm:AuthCapPSV dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthCapPSV>frm:AuthCapUCSN</frm:AuthCapUCSN><frm:AuthCapUCSV dd:minOccur=“0” dd:nullType=“exclude”></frm:AuthCapUCSV><frm:IssuedCapOfCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:IssuedCapOfCmp><frm:IssuedNominalAmtPerES dd:minOccur=“0” dd:nullType=“exclude”></frm:IssuedNominalAmtPerES><frm:IssuedNominalAmtPerPS dd:minOccur=“0” dd:nullType=“exclude”></frm:IssuedNominalAmtPerPS>frm:IssuedCapESN</frm:IssuedCapESN><frm:IssuedCapESV dd:minOccur=“0” dd:nullType=“exclude”></frm:IssuedCapESV>frm:IssuedCapPSN</frm:IssuedCapPSN><frm:IssuedCapPSV dd:minOccur=“0” dd:nullType=“exclude”></frm:IssuedCapPSV><frm:SubsCapOfCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:SubsCapOfCmp><frm:SubsNominalAmtPerES dd:minOccur=“0” dd:nullType=“exclude”></frm:SubsNominalAmtPerES><frm:SubsNominalAmtPerPS dd:minOccur=“0” dd:nullType=“exclude”></frm:SubsNominalAmtPerPS>frm:SubsCapESN</frm:SubsCapESN><frm:SubsCapESV dd:minOccur=“0” dd:nullType=“exclude”></frm:SubsCapESV>frm:SubsCapPSN</frm:SubsCapPSN><frm:SubsCapPSV dd:minOccur=“0” dd:nullType=“exclude”></frm:SubsCapPSV><frm:PaidupCapOfCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:PaidupCapOfCmp><frm:PaidupNominalAmtPerES dd:minOccur=“0” dd:nullType=“exclude”></frm:PaidupNominalAmtPerES><frm:PaidupNominalAmtPerPS dd:minOccur=“0” dd:nullType=“exclude”></frm:PaidupNominalAmtPerPS>frm:PaidupCapESN</frm:PaidupCapESN><frm:PaidupCapESV dd:minOccur=“0” dd:nullType=“exclude”></frm:PaidupCapESV>frm:PaidupCapPSN</frm:PaidupCapPSN><frm:PaidupCapPSV dd:minOccur=“0” dd:nullType=“exclude”></frm:PaidupCapPSV><frm:TotalDevntrOfCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:TotalDevntrOfCmp><frm:DevntrNominalAmtPerNCDeb dd:minOccur=“0” dd:nullType=“exclude”></frm:DevntrNominalAmtPerNCDeb><frm:DevntrNominalAmtPerPCDeb dd:minOccur=“0” dd:nullType=“exclude”></frm:DevntrNominalAmtPerPCDeb><frm:DevntrNominalAmtPerFCDeb dd:minOccur=“0” dd:nullType=“exclude”></frm:DevntrNominalAmtPerFCDeb><frm:NonConvDebNum dd:minOccur=“0” dd:nullType=“exclude”></frm:NonConvDebNum><frm:NonConvDebVal dd:minOccur=“0” dd:nullType=“exclude”></frm:NonConvDebVal><frm:PartlyConvDebNum dd:minOccur=“0” dd:nullType=“exclude”></frm:PartlyConvDebNum><frm:PartlyConvDebVal dd:minOccur=“0” dd:nullType=“exclude”></frm:PartlyConvDebVal><frm:FullyConvDebNum dd:minOccur=“0” dd:nullType=“exclude”></frm:FullyConvDebNum><frm:FullyConvDebVal dd:minOccur=“0” dd:nullType=“exclude”></frm:FullyConvDebVal>frm:IndbtAmt</frm:IndbtAmt><frm:CntrlStGovt dd:minOccur=“0” dd:nullType=“exclude”></frm:CntrlStGovt><frm:GovtCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:GovtCmp><frm:PubFinCmp dd:minOccur=“0” dd:nullType=“exclude”></frm:PubFinCmp><frm:NtnOthBnk dd:minOccur=“0” dd:nullType=“exclude”></frm:NtnOthBnk><frm:MutFunds dd:minOccur=“0” dd:nullType=“exclude”></frm:MutFunds><frm:VenCap dd:minOccur=“0” dd:nullType=“exclude”></frm:VenCap><frm:FrgnHld dd:minOccur=“0” dd:nullType=“exclude”></frm:FrgnHld><frm:BodCorp dd:minOccur=“0” dd:nullType=“exclude”></frm:BodCorp><frm:DirRelDir dd:minOccur=“0” dd:nullType=“exclude”></frm:DirRelDir><frm:Oth50ShHld dd:minOccur=“0” dd:nullType=“exclude”></frm:Oth50ShHld><frm:Others dd:minOccur=“0” dd:nullType=“exclude”></frm:Others>frm:TtlNoShrHld</frm:TtlNoShrHld><frm:NoMDirOrDir dd:minOccur=“0” dd:nullType=“exclude”></frm:NoMDirOrDir><frm:DetailsOfMGSecorManInfo dd:minOccur=“0”><frm:DetailsOfMGSecorManager dd:maxOccur=“20” dd:minOccur=“0”><cdt:DINorPAN xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DINorPAN><cdt:PersonFullName xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:PersonFullName><cdt:Designation xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Designation><cdt:DateOfAppoint xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DateOfAppoint><cdt:NoOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:NoOfEquityShare><cdt:PercentageOfEquityShare xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:PercentageOfEquityShare><cdt:WhtrSignTheRetrn xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:WhtrSignTheRetrn><cdt:DateOfSign xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DateOfSign></frm:DetailsOfMGSecorManager></frm:DetailsOfMGSecorManInfo><frm:NoMDirOrDirtoCease dd:minOccur=“0” dd:nullType=“exclude”></frm:NoMDirOrDirtoCease><frm:DetailsOMGtoCeaseInfo dd:minOccur=“0”><frm:DetailsOfMGtoCease dd:maxOccur=“8” dd:minOccur=“0”><cdt:DINorPAN xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DINorPAN><cdt:PersonFullName xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:PersonFullName><cdt:Designation xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:Designation><cdt:DateOfAppoint xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DateOfAppoint><cdt:DateOfCessation xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:DateOfCessation></frm:DetailsOfMGtoCease></frm:DetailsOMGtoCeaseInfo><frm:DetailOfSecName dd:minOccur=“0” dd:nullType=“exclude”></frm:DetailOfSecName><frm:WhthrAssocorFellw dd:minOccur=“0” dd:nullType=“exclude”></frm:WhthrAssocorFellw><frm:CrtificateOfPrctsNo dd:minOccur=“0” dd:nullType=“exclude”></frm:CrtificateOfPrctsNo><frm:WhtrListOfAttachmt dd:minOccur=“0” dd:nullType=“exclude”></frm:WhtrListOfAttachmt><frm:BoardResNo dd:minOccur=“0” dd:nullType=“exclude”></frm:BoardResNo>frm:DateDeclaration</frm:DateDeclaration>frm:Designation</frm:Designation><frm:DINMembrNo dd:minOccur=“0” dd:nullType=“exclude”></frm:DINMembrNo><frm:DINMembrNoNew dd:minOccur=“0” dd:nullType=“exclude”></frm:DINMembrNoNew><frm:CharteredorCostorCompany dd:minOccur=“0” dd:nullType=“exclude”></frm:CharteredorCostorCompany><frm:AssociateorFellow dd:minOccur=“0” dd:nullType=“exclude”></frm:AssociateorFellow><frm:MembershipnumberorCertificate dd:minOccur=“0” dd:nullType=“exclude”></frm:MembershipnumberorCertificate><frm:HTF dd:minOccur=“0” dd:nullType=“exclude”></frm:HTF>frm:FormId</frm:FormId>frm:VersionNo</frm:VersionNo>frm:AttachmentNames</frm:AttachmentNames></frm:FormSchV><srn:ServiceRequestNumberDetails xmlns:srn=“http://www.mit.gov.in/eGov/BackOffice/schema/SRNDetails”>srn:SRN</srn:SRN><srn:ResubmissionFlag dd:minOccur=“0” dd:nullType=“exclude”></srn:ResubmissionFlag>srn:BusinessDate</srn:BusinessDate><srn:FilingDueDate dd:minOccur=“0” dd:nullType=“exclude”></srn:FilingDueDate><srn:LinkFlag dd:minOccur=“0” dd:nullType=“exclude”></srn:LinkFlag><srn:OldSrn dd:minOccur=“0” dd:nullType=“exclude”></srn:OldSrn><srn:TotalNoOfMsgs dd:minOccur=“0” dd:nullType=“exclude”></srn:TotalNoOfMsgs><srn:SequenceNo dd:minOccur=“0” dd:nullType=“exclude”></srn:SequenceNo><srn:FolderNumber dd:minOccur=“0” dd:nullType=“exclude”></srn:FolderNumber><srn:RSubLinkStatus dd:minOccur=“0” dd:nullType=“exclude”></srn:RSubLinkStatus></srn:ServiceRequestNumberDetails><usr:UserDetails xmlns:usr=“http://www.mit.gov.in/eGov/BackOffice/schema/UserDetails”><usr:SourceOfSRN dd:minOccur=“0” dd:nullType=“exclude”></usr:SourceOfSRN>usr:UserType<dd:group dd:model=“choice”>dd:group<cdt:CreatedUser xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:CreatedUser><cdt:CreatedTimestamp xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:CreatedTimestamp></dd:group>dd:group<cdt:UpdatedUser xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:UpdatedUser><cdt:UpdatedTimestamp xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes”></cdt:UpdatedTimestamp></dd:group></dd:group></usr:UserType><usr:WorkStationID dd:minOccur=“0” dd:nullType=“exclude”></usr:WorkStationID></usr:UserDetails><sig:SignatureDetails xmlns:sig=“http://www.mit.gov.in/eGov/BackOffice/schema/SignatureDetails” dd:maxOccur=“-1”><sig:SignedUser dd:minOccur=“0” dd:nullType=“exclude”></sig:SignedUser><sig:SignedUserRole dd:minOccur=“0” dd:nullType=“exclude”></sig:SignedUserRole>sig:SerialNo</sig:SerialNo>sig:SourceCA</sig:SourceCA><sig:UniqueID dd:minOccur=“0” dd:nullType=“exclude”></sig:UniqueID></sig:SignatureDetails><tms:TimestampDetails xmlns:tms=“http://www.mit.gov.in/eGov/BackOffice/schema/TimeStampDetails” dd:maxOccur=“-1” dd:minOccur=“0”>tms:ContentId</tms:ContentId>tms:DocumentTimestamp</tms:DocumentTimestamp>tms:CertSerialNum</tms:CertSerialNum>tms:CertSubjectDN</tms:CertSubjectDN>tms:CertIssuerDN</tms:CertIssuerDN></tms:TimestampDetails><pay:PaymentDetails xmlns:pay=“http://www.mit.gov.in/eGov/BackOffice/schema/PAY” dd:minOccur=“0”>pay:PaymentMode</pay:PaymentMode>pay:PaymentType</pay:PaymentType>pay:PaymentStatus</pay:PaymentStatus><pay:OrderNumber dd:minOccur=“0” dd:nullType=“exclude”></pay:OrderNumber><pay:ProviderId dd:minOccur=“0” dd:nullType=“exclude”></pay:ProviderId>pay:AmountPaid</pay:AmountPaid><pay:CreditCardNumber dd:minOccur=“0” dd:nullType=“exclude”></pay:CreditCardNumber><pay:ValidityDate dd:minOccur=“0” dd:nullType=“exclude”></pay:ValidityDate></pay:PaymentDetails><atc:Attachments xmlns:atc=“http://www.mit.gov.in/eGov/BackOffice/schema/AttachmentDetails” dd:maxOccur=“-1” dd:minOccur=“0”>atc:ContentId</atc:ContentId>atc:MimeType</atc:MimeType>atc:PageCount</atc:PageCount></atc:Attachments><fee:FeeDetails xmlns:fee=“http://www.mit.gov.in/eGov/BackOffice/schema/FeeDetails” dd:minOccur=“0”><fee:FilingFee dd:minOccur=“0” dd:nullType=“exclude”></fee:FilingFee><fee:AddlnFee dd:minOccur=“0” dd:nullType=“exclude”></fee:AddlnFee><fee:CSAFee dd:minOccur=“0” dd:nullType=“exclude”></fee:CSAFee><fee:CSAUserID dd:minOccur=“0” dd:nullType=“exclude”></fee:CSAUserID><fee:MemorandumFee dd:minOccur=“0” dd:nullType=“exclude”></fee:MemorandumFee><fee:ArticleFee dd:minOccur=“0” dd:nullType=“exclude”></fee:ArticleFee><fee:StampDutyAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:StampDutyAmt><fee:PenaltyAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:PenaltyAmt><fee:InterestAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:InterestAmt><fee:DocumentFee dd:minOccur=“0” dd:nullType=“exclude”></fee:DocumentFee>fee:NormalFee</fee:NormalFee><fee:EventDate dd:minOccur=“0” dd:nullType=“exclude”></fee:EventDate><fee:AttchmntFeeDtls dd:minOccur=“0”><fee:IndvAttchFeeDtls dd:maxOccur=“-1” dd:minOccur=“0”><cdt:ContentID xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:ContentID><cdt:AttachedFormID xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:AttachedFormID><cdt:FilingFee xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:FilingFee><cdt:AdditionalFee xmlns:cdt=“http://www.mit.gov.in/eGov/BackOffice/schema/ComplexDataTypes” dd:minOccur=“0” dd:nullType=“exclude”></cdt:AdditionalFee></fee:IndvAttchFeeDtls></fee:AttchmntFeeDtls><fee:LinkedFormDtls dd:maxOccur=“-1” dd:minOccur=“0”>fee:FormId</fee:FormId><fee:FilingFee dd:minOccur=“0” dd:nullType=“exclude”></fee:FilingFee><fee:AddlnFee dd:minOccur=“0” dd:nullType=“exclude”></fee:AddlnFee><fee:CSAFee dd:minOccur=“0” dd:nullType=“exclude”></fee:CSAFee><fee:CSAUserID dd:minOccur=“0” dd:nullType=“exclude”></fee:CSAUserID><fee:MemorandumFee dd:minOccur=“0” dd:nullType=“exclude”></fee:MemorandumFee><fee:ArticleFee dd:minOccur=“0” dd:nullType=“exclude”></fee:ArticleFee><fee:StampDutyAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:StampDutyAmt><fee:PenaltyAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:PenaltyAmt><fee:InterestAmt dd:minOccur=“0” dd:nullType=“exclude”></fee:InterestAmt><fee:DocumentFee dd:minOccur=“0” dd:nullType=“exclude”></fee:DocumentFee>fee:NormalFee</fee:NormalFee></fee:LinkedFormDtls></fee:FeeDetails></frm:FormSchV_Dtls></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“CINDataConngetCompanyDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getCompanyDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strCompanyID dd:nullType=“xsi”></impl:strCompanyID></impl:getCompanyDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“PrescrutinyServiceserviceForm20BRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:serviceForm20B xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:objForm20BPrescDDto dd:nullType=“xsi”><tns2:strAGMDate xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strAGMDate><tns2:strCIN xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strCIN><tns2:strCountry xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strCountry><tns2:strDecDate xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDecDate><tns2:strDesgnation xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDesgnation><tns2:strDINMemNum xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINMemNum><tns2:strDueAGMDate xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDueAGMDate><tns2:strDueAGMExtDate xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDueAGMExtDate><tns2:strDupFlag xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDupFlag><tns2:strFinYrEndDate xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strFinYrEndDate><tns2:strFormID xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strFormID><tns2:strFormVersion xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strFormVersion><tns2:strPin xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strPin><tns2:strState xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strState><tns2:strPresNumber xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strPresNumber><tns2:dateOfSign1 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign1><tns2:dateOfSign10 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign10><tns2:dateOfSign11 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign11><tns2:dateOfSign12 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign12><tns2:dateOfSign13 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign13><tns2:dateOfSign14 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign14><tns2:dateOfSign15 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign15><tns2:dateOfSign16 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign16><tns2:dateOfSign17 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign17><tns2:dateOfSign18 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign18><tns2:dateOfSign19 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign19><tns2:dateOfSign2 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign2><tns2:dateOfSign20 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign20><tns2:dateOfSign3 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign3><tns2:dateOfSign4 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign4><tns2:dateOfSign5 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign5><tns2:dateOfSign6 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign6><tns2:dateOfSign7 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign7><tns2:dateOfSign8 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign8><tns2:dateOfSign9 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:dateOfSign9><tns2:DOAcess1 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess1><tns2:DOAcess2 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess2><tns2:DOAcess3 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess3><tns2:DOAcess4 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess4><tns2:DOAcess5 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess5><tns2:DOAcess6 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess6><tns2:DOAcess7 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess7><tns2:DOAcess8 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOAcess8><tns2:DOCcess1 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess1><tns2:DOCcess2 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess2><tns2:DOCcess3 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess3><tns2:DOCcess4 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess4><tns2:DOCcess5 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess5><tns2:DOCcess6 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess6><tns2:DOCcess7 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess7><tns2:DOCcess8 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:DOCcess8><tns2:strCertOfPracNo xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strCertOfPracNo><tns2:strDIN1 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN1><tns2:strDIN10 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN10><tns2:strDIN11 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN11><tns2:strDIN12 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN12><tns2:strDIN13 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN13><tns2:strDIN14 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN14><tns2:strDIN15 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN15><tns2:strDIN16 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN16><tns2:strDIN17 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN17><tns2:strDIN18 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN18><tns2:strDIN19 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN19><tns2:strDIN2 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN2><tns2:strDIN20 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN20><tns2:strDIN3 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN3><tns2:strDIN4 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN4><tns2:strDIN5 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN5><tns2:strDIN6 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN6><tns2:strDIN7 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN7><tns2:strDIN8 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN8><tns2:strDIN9 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDIN9><tns2:strDINcess1 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess1><tns2:strDINcess2 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess2><tns2:strDINcess3 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess3><tns2:strDINcess4 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess4><tns2:strDINcess5 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess5><tns2:strDINcess6 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess6><tns2:strDINcess7 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess7><tns2:strDINcess8 xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINcess8><tns2:strDINSign xmlns:tns2=“http://dto.eforms.business.mydca.dca21.com” dd:nullType=“xsi”></tns2:strDINSign></impl:objForm20BPrescDDto></impl:serviceForm20B></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn1getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn2getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn3getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn4getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn5getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn6getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn7getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn8getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn9getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn10getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn11getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn12getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn13getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn14getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn15getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn16getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn17getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn18getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn19getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINPANDataConn20getDINDetailsNewRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getDINDetailsNew xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN><impl:strCIN dd:nullType=“xsi”></impl:strCIN><impl:dateAGM dd:nullType=“xsi”></impl:dateAGM><impl:dueDateAGM dd:nullType=“xsi”></impl:dueDateAGM></impl:getDINDetailsNew></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn1getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn2getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn3getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn4getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn5getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn6getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn7getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription><dd:dataDescription xmlns:dd=“http://ns.adobe.com/data-description/” dd:name=“DINDataConn8getForm32DINDetailsRequestDD”><soap:Body xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”><impl:getForm32DINDetails xmlns:impl=“http://prefill.eforms.userinterface.mydca.dca21.com”><impl:strDIN dd:nullType=“xsi”></impl:strDIN></impl:getForm32DINDetails></soap:Body></dd:dataDescription></xfa:datasets>’

Instead of posting multiple screenfuls of XML data to the forum, consider wrapping the XML data first with <details> </details> tags, then with triple backticks. Please.

3 Likes

I’ve just run your programme here, with your example XML file. I’ve
running this version of your code:

 from pprint import pprint
 import xmltodict
 import pandas as pd

 # open the input xml file and read data in form of python dictionary 
 # using xmltodict module
 with open(r"foo2.xml") as xml_file:
     data_dict = xmltodict.parse(xml_file.read())
         # xml_file.close()
         # df=pd.DataFrame()
     df=pd.json_normalize(data_dict)
     df.to_csv('data.csv')

 pprint(data_dict)

It certainly produces a CSV file, and also prints (using pprint) a
nice dump of the data in data_dict. That is a deeply nested dict.
Here’s the start:

 { 'xfa:datasets': { '@xmlns:xfa': 'http://www.xfa.org/schema/xfa-data/1.0/',
                     'dd:dataDescription': [ { '@dd:name': 'FormSchV_Dtls',
                                               '@xmlns:dd': 'http://ns.adobe.com/data-description/',
                                               'frm:FormSchV_Dtls': { '@xmlns:frm': 'http://www.mit.gov.in/eGov/BackOffice/schema/Form',
                                                                      'atc:Attachments': { '@dd:maxOccur': '-1',
                                                                                           '@dd:minOccur': '0',
                                                                                           '@xmlns:atc': 'http://www.mit.gov.in/eGov/BackOffice/schema/AttachmentDetails',
                                                                                           'atc:ContentId': None,
                                                                                           'atc:MimeType': None,
                                                                                           'atc:PageCount': None},
                                                                      'fee:FeeDetails': { '@dd:minOccur': '0',
                                                                                          '@xmlns:fee': 'http://www.mit.gov.in/eGov/BackOffice/schema/FeeDetails',
                                                                                          'fee:AddlnFee': { '@dd:minOccur': '0',

and so on.

Have you tried opening the CSV in some spreadsheet program such as
Excel? Does it look like what you expect?

You say data’s missing, but we have no idea what you expect to see or
what is missing.

xmltodict is not magic. It translates XML into a nested data structure
much as one might get from a format like JSON:
(xmltodict)[xmltodict · PyPI]. Their second example
suggests you might get more understandable result from xmltodict with
the process_namespaces=True parameter. I haven’t tried that.

CSV files (and pandas DataFrames) are inherently fairly flat data
structures, a mapping of column names to indexed values.

To convert one to the other requires deciding what data within the XML
should become data, and in what form.

Until you actually inspect the XML you can’t just wave a wand to
“generate a CSV” from it. They’re fundamentally different shapes, and
some manipulation will be needed.

Cheers,
Cameron Simpson cs@cskk.id.au

Thank you for helping me with this.

Actually, I have a PDF file which is basically a form and i want to extract all the field names as a column name and the information associated with them and then save them into an excel file. After further investigation, I discovered that it is an XFA-based PDF. Then the below code is used to extract the XML from the XFA-based PDF:

import PyPDF2 as pypdf

def findInDict(needle, haystack):
    for key in haystack.keys():
        try:
            value=haystack[key]
        except:
            continue
        if key==needle:
            return value
        if isinstance(value,dict):            
            x=findInDict(needle,value)            
            if x is not None:
                return x

pdfobject=open('pdf_file.pdf','rb')
pdf=pypdf.PdfFileReader(pdfobject)
xfa=findInDict('/XFA',pdf.resolved_objects)
xml=xfa[7].getObject().getData()

print(xml)

I attempted to convert the XML to CSV/Excel, but I was unable to do so due to UTF-8 (i guess). I then used a online converter to convert the XML to JSON and finally the JSON to CSV.

Then I wrote the below code to convert the XML and JSON.

import xmltodict
import json
xml_data = xml
data = xmltodict.parse(xml_data)
# using json.dumps to convert dictionary to JSON
json_data = json.dumps(data, indent = 2)
print(json_data)

I now want to modify this script so that I can just copy the PDF file into the folder where the script is located, and then, once it has been executed, the JSON file will be generated with the same name as the input file name.

Please assist me with this.

I just made a Python programme thus:

 with open('foo2.xml','wb') as f:
   f.write(b'<xfa:datasets..........')

and had a foo2.xml file ready for use :slight_smile:

Cheers,
Cameron Simpson cs@cskk.id.au