I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-03-30 22:33:05-07 by fou
Error Message: No XML Content

(1) I used the OpenOffice::OODoc module to create a simple .odt file with the words "Hello World !"

(2) I opened the file ("hello_world.odt") in OpenOffice and it had the message as expected.

(3) But then when I tried to read from the file using OpenOffice::OODoc, I got the following message:

[OpenOffice::OODoc::XPath::new] No XML content

Scripts:

(1) =========================== oo_hello_world_write.pl ===========================

use OpenOffice::OODoc; my $ar = ooFile("hello_world.odt", create => "text"); my $doc = ooDocument(archive => $ar, member => "content"); $doc->appendParagraph(text => "Hello World !", style => "Standard"); $ar->save;

(3) =========================== oo_hello_world_read.pl ===========================

use OpenOffice::OODoc; my $archive - ooFile('hello_world.odt'); my $doc = ooDocument(archive => $archive, member => 'content'); my $par = $doc->getParagraph(0);

Specifically, when I typed

perl oo_hello_world_read.pl

I got

[OpenOffice::OODoc::XPath::new] No XML content

Can't call method "getParagraph" on an undefined value at oo_hello_world_read.pl line 6.

Direct Responses: 4728 | Write a response
Posted on 2007-03-31 11:29:25-07 by jeunice in response to 4725
Re: Error Message: No XML Content
So, in oo_hello_world_read.pl, did you really mean to SUBTRACT the results of ooFile() from $archive? I suspect you'd have better luck if you ASSIGNED the results, as in my $archive = ooFile(...);
Direct Responses: 4732 | Write a response
Posted on 2007-03-31 17:52:20-07 by fou in response to 4728
Re: Error Message: No XML Content

I would say I'm surprised that I didn't get an error message on the subtraction line, but this is Perl.

Thanks so much for pointing that out.

I'm sorry I wasted your time.

Direct Responses: Write a response