I have this block of XML:
<context id="134">Multiline incoming:
This is my 1st line.
This is my 2nd line.
This is my 3rd line.
</context>
Is there a way to remove the spacing automatically with any XML parsing library like LibXML in Perl? I can get rid of them manually, but I am interested if there is a method for this already in place.
I'd like my output to be:
$context = "Multiline incoming: This is my 1st line. This is my 2nd line. This is my 3rd line."
All you need is this: