---
name: "MAB2::Parser::XML"
section: "3pm"
platform: "linux"
package: "libcatmandu-mab2-perl"
version: "0.24-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MAB2::Parser::XML"
---

# MAB2::Parser::XML(3pm)

MAB2 XML parser

## NAME

MAB2::Parser::XML - MAB2 XML parser

## SYNOPSIS

MAB2::Parser::XML is a parser for MAB2 XML records.

```
    use MAB2::Parser::XML;
    my $parser = MAB2::Parser::XML->new( $filename );
    while ( my $record_hash = $parser->next() ) {
        # do something
    }
```

## Arguments

- "file"

  Path to file with MAB2 XML records.

- "fh"

  Open filehandle for file with MAB2 XML records.

- "string"

  XML string with MAB2 XML records.

## METHODS

### new($filename \| $filehandle \| $string)

### next()

Reads the next record from MAB2 XML input stream. Returns a Perl hash.

### \_decode($record)

Deserialize a MAB2 XML record to an an ARRAY of ARRAYs.

## SEEALSO

Catmandu::Importer::MAB2.

## AUTHOR

Johann Rolschewski \<jorol@cpan.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Johann Rolschewski.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
