in reply to Re: Re: Re: Preferred Methods (again)
in thread Preferred Methods (again)

seattlejohn already commented on xml compliance.

With an XML parser you don't have to change your parsing for grabbing the root element when the input changes, with a regex you (probably) do.

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Preferred Methods (again)
by perrin (Chancellor) on Jan 17, 2002 at 01:44 UTC
    With an XML parser you don't have to change your parsing for grabbing the root element when the input changes

    Not when the content changes, but when the format changes you do. You example was a format change: <root><foo/><root><bar/></root></root> <!-- Yes, your regex will take the second <root> --> If that's even legal, it would certainly require changes in your code to get the right part.