
PBib::Document::XML - XML documents

use PBib::Document;
my $doc = new PBib::Document(
'filename' => 'sample.xml',
'mode' => 'r',
);
print $doc->filename();
$doc->close();

Provide an interface to XML for PBib.
Main difference to other documents is that XML documents have a hierarchical structure, not a linear one.
Therefore, processParagraphs() is overwritten.
Used as base class for OpenOffice documents.

Return the document's encoding.
Returns undef if not specified.
Read the document from disk. Return the content of the document in a format internal to the document class. (Per default a ref to an array of the lines.)
Write the document back to disk, if the document has been opened and it contains paragraphs().
$fh is the FileHandle it should print to. If undef, $self->handle() is used.

Methods used by PBib to access the document.
For an XML document, a "paragraph" is each CDATA element.
Here, we return the number of paragraphs.
While processing the document (processParagraphs()), this returns an array with all parent [tag, attrib]
Return the number of paragraphs in document.
Return the doc root as XML::Parser's hash encoding.
(Equivalent of PBib::Document::paragraphs().)
Return element at @path, e.g. getElement('body', 'p', 'ol', 'i').
If there are multiple elements with the same tag, the first is used.

Methods used by PBib to create formatted text.