in reply to Re: How to remove elements with XML::LibXML
in thread How to remove elements with XML::LibXML

Hi corion,
You were right about the XPath expression. It works well now, I just try now. Thanks so much.
But the error got it are:

Multidimensional syntax $d ,$value not supported at C:\Program Files\Apache G oup\Apache2\cgi-bin\legas\delsub.pl line 12.
Global symbol "@d" requires explicit package name at C:\Program Files\Apache Gr up\Apache2\cgi-bin\legas\delsub.pl line 12.
syntax error at C:\Program Files\Apache Group\Apache2\cgi-bin\legas\delsub.pl l ne 12, near "[,"
Execution of C:\Program Files\Apache Group\Apache2\cgi-bin\legas\delsub.pl abor ed due to compilation errors.

Anyway, Thank you so much. I reall appreciate.
Maxim
  • Comment on Re^2: How to remove elements with XML::LibXML

Replies are listed 'Best First'.
Re^3: How to remove elements with XML::LibXML
by Corion (Patriarch) on Oct 10, 2004 at 09:58 UTC

    Please, Maxim, read the documentation, and read about Perl syntax. You this syntax error, because you copied stuff out of the documentation without reading it and realizing that the $d, [$value] part is not meant to be copied verbatim. The square brackets around $value are used to describe that it is an optional parameter.

    I recommend that you read a book about Perl and also read the documentation for the functions you are using before piecing together a script by copying from the documentation.

      Thanks for your advice corion but somtime I found the documention not enought clear and even the book. They are not enought straight forward even on of my tutor, he complain there is not enough example to tell you what the code means or what the code do.
      I have read a book of Perl "Perl and CGI for the World Wide Web" and it is quite straight forward what you need to do. What this book says, it is better to give example to the novice instead to a long documentation to read. I don't blame you "corion" because you are right and I respect all the people from this useful forum. For me, it is a great forum to have discussion and to have help from wise people.

      Maxim