---
name: "Catmandu::Importer::SRU::Parser::struct"
section: "3pm"
platform: "linux"
package: "libcatmandu-sru-perl"
version: "0.43.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Importer::SRU::Parser::struct"
---

# Catmandu::Importer::SRU::Parser::struct(3pm)

transform SRU responses into structured XML records

## NAME

Catmandu::Importer::SRU::Parser::struct - transform SRU responses into structured XML records

## SYNOPSIS

```
    my $importer = Catmandu::Importer::SRU->new(
        base   => $base,
        query  => $query,
        parser => 'struct'
    );
```

## DESCRIPTION

Each SRU response record will be transformed into order-preserving, structured XML as defined by XML::Struct.

## CONFIGURATION

Options of XML::Struct::Reader are not supported. As workaround wrap the reader as following, if needed:

```
    my $reader = XML::Struct::Reader->new( %options );
    my $importer = Catmandu::Importer::SRU->new(
        base   => $base,
        query  => $query,
        parser => sub {
            $reader->readDocument(
                XML::LibXML::Reader->new( string => $_[0]->{recordData} )
            );
        },
    );
```

## AUTHOR

Jakob Voss `"voss@gbv.de"`
