DodgyDavid
Programmer
Hi there,
I have some XML data that I need to work with, that is processed sequentially through a flat file before being manipulated and output in a legacy format for importing on an older system.
In the final phase of the program data must be in a format that has field name on one line followed by all of the data on the next and so on e.g.
Field 1
Data
Field 2
Data etc
What I have encountered is a data stream that looks like this...
<Data>
Data line 1
Data line 2
Data line 3
</Data>
This needs to end up in the format...
<Data>
Data line 1; Data line 2; Data line 3;
</Data>
Because of the nature of the rest of the data in the file, at this point it is not possible to parse the data into arrays, everything must be handled as a global modification.
However I am struggling to find a regexp that will do what I need with the string. Can anyone help?
Regards,
David
I have some XML data that I need to work with, that is processed sequentially through a flat file before being manipulated and output in a legacy format for importing on an older system.
In the final phase of the program data must be in a format that has field name on one line followed by all of the data on the next and so on e.g.
Field 1
Data
Field 2
Data etc
What I have encountered is a data stream that looks like this...
<Data>
Data line 1
Data line 2
Data line 3
</Data>
This needs to end up in the format...
<Data>
Data line 1; Data line 2; Data line 3;
</Data>
Because of the nature of the rest of the data in the file, at this point it is not possible to parse the data into arrays, everything must be handled as a global modification.
However I am struggling to find a regexp that will do what I need with the string. Can anyone help?
Regards,
David