http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415

Galen Charlton <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14661|0                           |1
        is obsolete|                            |

--- Comment #4 from Galen Charlton <[email protected]> ---
Created attachment 14719
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14719&action=edit
Bug 9415: XML catalog export is missing root node

When exporting some biblio or authorities records with tools/export.pl (via web
client or command-line) :
If choosing XML format, you get a concatenation of full XML records.

This patch uses MARC::File::XML to create a well formated file.
See
http://search.cpan.org/~gmcharlt/MARC-XML-0.93/lib/MARC/File/XML.pm#close%28%29

Test plan:
- Go to Tools/Export data
- Enter numbers in from and to biblio number
  (make sure that at least two records will
   be exported).
- Select xml in file format
- Click "Export bibliographic records"
- Save file somewhere
- Look at downloaded file
=> File should look like :
   <?xml version="1.0" encoding="UTF-8"?>
   <collection
   ...

   <record>
   ...
   </record>

   <record>
   ...
   </record>

   </collection>
=> "collection" is the root node and XML declaration exists only once
- Do the same for authorities export and command-line use of tools/export.pl

Second test plan:

- From the command line, run tools/export.pl, e.g.,

  tools/export.pl  --format=xml --filename=bibs.xml

- Verify that the output is valid XML, e.g.,

  xmllint --noout bibs.xml # if the file is valid, no error messages will be
displayed

Signed-off-by: Galen Charlton <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to