in reply to Re^2: XML parsing
in thread XML parsing

Yes, you are of course right. I was only looking on the xmlin line not on the qx one. However, the added spaces shouldn't do any harm in normal XML files.

I had the "@array" version in mind because I used XML::Simple just this week and had to read the input file manually line-wise to fix a known broken tag before calling xmlin.

Replies are listed 'Best First'.
Re^4: XML parsing
by Jenda (Abbot) on Sep 17, 2008 at 20:43 UTC

    Depends on what do you call normal. It will not corrupt the XML, but it may change the text content of some tags. Even in a data-oriented XML. I don't know about your XML files, but mine often do contain tags with several lines long content.

      Jenda, you are of course right in the general case. My original posting said "use stringification or join" to avoid that the 2nd and later lines are taken as XML::Simple options. I was just pointing the OP in the right direction and was trusting him to figure out if spaces are significant for his application or not. If so, a local $" = '' or, like I said before, a  join '', @array would do the job.

      BTW, my XML file was a XHTML website.