Permalink
Browse files

Strange complaints about startDocument() not being allowed in toXMLHe…

…ader()

Moving it for now, but for some reason this results in no XML header being
generated. ARGH.


git-svn-id: https://svn.php.net/repository/pear/packages/File_MARC/trunk@301727 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 4b01e90 commit 41a9e82b4017ce6719a4ec3946523d0be253e55f Dan Scott committed Jul 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 MARCXML.php
View
@@ -132,6 +132,7 @@ function __construct($source, $type = self::SOURCE_FILE)
$this->xmlwriter = new XMLWriter();
$this->xmlwriter->openMemory();
+ $this->xmlwriter->startDocument('1.0', 'UTF-8');
switch ($type) {
@@ -250,7 +251,6 @@ private function _decode($text)
*/
function toXMLHeader()
{
- $this->xmlwriter->startDocument('1.0', 'UTF-8');
$this->xmlwriter->startElement("collection");
$this->xmlwriter->writeAttribute("xmlns", "http://www.loc.gov/MARC21/slim");
return true;

0 comments on commit 41a9e82

Please sign in to comment.