Re: Stripping XML declaration

William McKee <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
Hi Josh,

Please reply to the list in the future.

> It would be 
>  $processed =~ s#^ \s* <\?xml version="1.0"\?> \s* ##xs;
>  #s to treat as single string
>  #x to allow readability whitespace in the left hand side

Thanks for the regex. Did that work for you?


> I would definitely not recommend any sort of XML parser for this single
> change, esp. since is defined as occuring at the beginning of the document.

I'd agree. I was just making suggestions. I prefer to look at all
possible solutions and avoid premature optimization.


Regards,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.