Discussion Locked

Read a xml file to get some information from it

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

have a xml file with the following format:

first
lastcompanyaddr1addr22222addr3333Brisbane000AU<
PhoneNumber>1234512312
345email@au.comI7560
brazil1gghrrtrt
sape58340BR67778879gghj@jjk.com<
CnpjCpfId>25211178890CPFtestggh (This is line 5, it is even largest )

Requiriment:

I need to get is the following information: first last from the first label , and test from third label , company from the first label , and ggh from the third label and so on other information.

Problem:

I created a unix script file to read it using grep as follow:

grep filename.xml | cut -d\> -f2|cut -d\< -f1

and the result is the whole line in Line 5 described previously. How can I filter just to get the information I need from the file!?!?.

I will really appreciate your help to solve this problem.

Thank You!

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.