(1) Use XML::TokeParser.
(2) Use XML::TokeParser.
(3) Use XML::TokeParser.
Lee
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Saxena, Saurabh
> Sent: 07 June 2001 12:16
> To: 'Perl2'; 'Perl1'
> Subject: Help on subctitution s///
>
>
>
> I have a XML file which looks like
> "...
> <NAME>Saurabh </NAME>
> .."
>
> I want to remove the whitespace in the TAG value. I am using
>
> while (<>)
> {
> s/\s*<\/NAME>/<\/NAME>/; -->This will replace the
> <whitespace></NAME> with </NAME>
> print 4_;
> }
>
> On the console it is showing the value as
>
> "...
> <NAME>Saurabh</NAME>
> .."
>
> but the file is not touched.
>
> Now is it possible by any method to replace the whitespace on the file
> itself. Like open the file then replace the <whitespace></NAME> with
> </NAME> on the file itself and then close the file
>
> regards
> Saurabh
>
>
>
>
>
>
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users