<ns:Address>
<ns:StreetNumber>XXXXX</ns:StreetNumber>
<ns:CityName>XXXXXX</ns:CityName>
<ns:StateProvNamePA</ns:StateProvName>
<ns:ZIP>XXXX</ns:ZIP>
<ns:AddressID>
<ns:ID SystemCode="CODE">10</ns:ID>
</ns:AddressID>
</ns:Address>
<ns:Address>
<ns:StreetNumber>XXXXX</ns:StreetNumber>
<ns:CityName>XXXXXX</ns:CityName>
<ns:StateProvNamePA</ns:StateProvName>
<ns:ZIP>XXXX</ns:ZIP>
<ns:AddressID>
<ns:ID SystemCode="CODE">10</ns:ID>
</ns:AddressID>
</ns:Address>
<ns:Address>
<ns:StreetNumber>XXXXX</ns:StreetNumber>
<ns:CityName>XXXXXX</ns:CityName>
<ns:StateProvNamePA</ns:StateProvName>
<ns:ZIP>XXXX</ns:ZIP>
<ns:AddressID>
<ns:ID SystemCode="CODE">10</ns:ID>
</ns:AddressID>
</ns:Address>
<ns:Address>
<ns:StreetNumber>XXXXX</ns:StreetNumber>
<ns:CityName>XXXXXX</ns:CityName>
<ns:StateProvNamePA</ns:StateProvName>
<ns:ZIP>XXXX</ns:ZIP>
<ns:AddressID>
<ns:ID SystemCode="CODE">10</ns:ID>
</ns:AddressID>
</ns:Address>

I am tryting to Spilt a File into number of files depending on the number of ouucrances of the Unique Tag.

Like this I have 1200 entries of Files. I want to Extact the data between the <ns:Address> and </ns:Address> and create a new file for every ten such entires.

output:
Address 1 to Address 10 --> ADDRESS_10.TXT
Address 11 to Address 20 --> ADDRESS_20.TXT

Can anyone help me with this. I am new to UNIX so any kind of help is helpful

Thanks,
Venkat.
**********

Since you are using (presumably well-formed) XML, why not just use a scripting language with XML libraries (Ruby, Python, Perl, etc) to do this?

Hi,

Can you let me know how to do that in perl??

Thanks,
Venkat

Dunno, I am not a big perl user. Here is what google turned up: perl::XML

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.