Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello Techie,
this is my first question i am asking on code project. i am trying to parse xml file and Save the output in text tab delimited format in a specific location using either perl or shellscripting whichever is faster. i did this with sql and SSIS but it tooks more than 18 hours to execute.

i have xml file of minimum 1gb in size, and look sql is not effecient to parse.

May any one please help me on this.

xml structure:

XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ZNMT version="3.1">
	<Header>
		<Company>GoodKnight</Company>
		<SenderName>Nannini</SenderName>
		<SenderPhone>xxx 865 xxx</SenderPhone>
		<TransferDate>2005-02-12</TransferDate>
		<BrandAAIAID>BBHK</BrandAAIAID>
		<DocumentTitle>glid</DocumentTitle>
		<DocFormNumber>GP_2015_02_10</DocFormNumber>
		<EffectiveDate>2015-02-10</EffectiveDate>
		<ApprovedFor>IN</ApprovedFor>
		<SubmissionType>FULL</SubmissionType>
		<VcdbVersionDate>2005-01-30</VcdbVersionDate>
		<QdbVersionDate>2005-01-29</QdbVersionDate>
		<PcdbVersionDate>2005-01-30</PcdbVersionDate>
	</Header>
	<App action="A" id="1">
		<BaseVehicle id="822"/>
		<!-- 1986 Volvo 740 -->
		<EngineBase id="2137"/>
		<!-- L6 2.4L -->
		<Qty>6</Qty>
		<PartType id="7152"/>
		<!-- Diesel Glow Plug -->
		<MfrLabel>Diesel Glow Plug</MfrLabel>
		<Part>0250201032</Part>
	</App>
	<App action="A" id="5">
		<BaseVehicle id="890"/>
		<!-- 1975 Peugeot 504 -->
		<EngineBase id="810"/>
		<!-- L4 2.1L -->
		<Qty>4</Qty>
		<PartType id="7152"/>
		<!-- Diesel Glow Plug -->
		<MfrLabel>Diesel Glow Plug</MfrLabel>
		<Part>0250200055</Part>
	</App>
	<App action="A" id="1416">
		<BaseVehicle id="130192"/>
		<!-- 2015 Audi A6 Quattro -->
		<EngineBase id="3844"/>
		<!-- V6 181cid 3.0L -->
		<Qty>6</Qty>
		<PartType id="7152"/>
		<!-- Diesel Glow Plug -->
		<MfrLabel>Diesel Glow Plug</MfrLabel>
		<Part>0250403009</Part>
	</App>
	<App action="A" id="1417">
		<BaseVehicle id="130953"/>
		<!-- 2015 Ram 1500 -->
		<EngineBase id="6085"/>
		<!-- V6 182cid 3.0L -->
		<Qty>6</Qty>
		<PartType id="7152"/>
		<!-- Diesel Glow Plug -->
		<MfrLabel>Diesel Glow Plug</MfrLabel>
		<Part>0250603008</Part>
	</App>
	<Footer>
		<RecordCount>1417</RecordCount>
	</Footer>
</ZNMT>



Thanks a Ton
Regards
Vivan
Posted
Updated 24-Dec-15 6:06am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900