I am having a file with with format.
however, for longer xml, the xml code has been truncated like this.
F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB|
| | |LOCATION=MYLOC|COUNTRY=MYCON|TECHNOLOGY
| | |=XML</REQ></XML>
I want to make complete xml string.
output:
F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB|LOCATION=MYLOC|COUNTRY=MYCON|TECHNOLOGY=XML</REQ></XML>
because, I am using below command to fetch the xml code from the above file
sed -n '/<XML>.*<\/XML>/ s/.*\(<XML>.*<\/XML>\).*/\1/p' file
and it is failing for the above records.
is it possible to format the file like above, or is there way to get only xml code from the file?
note: I can't use awk since it exceeds the record limit and i dont have gawk.