# phpman > man > Image::ExifTool::TagInfoXML(3pm)

## NAME
    [Image::ExifTool::TagInfoXML](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ATagInfoXML/markdown) - Read/write tag information XML database

## DESCRIPTION
    This module is used to generate an XML database from all ExifTool tag information. The XML
    database may then be edited and used to re-generate the language modules
    ([Image::ExifTool::Lang](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ALang/markdown)::*).

## METHODS
### Write
    Print complete tag information database in XML format.

      # save list of all tags
      $success = [Image::ExifTool::TagInfoXML::Write](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ATagInfoXML%3A%3AWrite/markdown)('dst.xml');

      # list all IPTC tags to console, including Flags
      [Image::ExifTool::TagInfoXML::Write](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ATagInfoXML%3A%3AWrite/markdown)(undef, 'IPTC', Flags => 1);

      # write all EXIF Camera tags to file
      [Image::ExifTool::TagInfoXML::Write](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ATagInfoXML%3A%3AWrite/markdown)($outfile, 'exif:camera');

    Inputs:
        0) [optional] Output file name, or undef for console output. Output file will be overwritten
        if it already exists.

        1) [optional] String of group names separated by colons to specify the group to print. A
        specific IFD may not be given as a group, since EXIF tags may be written to any IFD. Saves
        all groups if not specified.

        2) [optional] Hash of options values:

            Flags   - Set to output 'flags' attribute
            NoDesc  - Set to suppress output of descriptions
            Lang    - Select a single language for output

    Return Value:
        True on success.

    Sample XML Output:

      <?xml version='1.0' encoding='UTF-8'?>
      <taginfo>

      <table name='[XMP::dc](https://www.chedong.com/phpMan.php/perldoc/XMP%3A%3Adc/markdown)' g0='XMP' g1='XMP-dc' g2='Other'>
       <desc lang='en'>XMP Dublin Core</desc>
       <tag id='title' name='Title' type='lang-alt' writable='true' g2='Image'>
        <desc lang='en'>Title</desc>
        <desc lang='de'>Titel</desc>
        <desc lang='fr'>Titre</desc>
       </tag>
       ...
      </table>

      </taginfo>

    Flags (if selected and available) are formatted as a comma-separated list of the following
    possible values: Avoid, Binary, List, Mandatory, Permanent, Protected, Unknown and Unsafe. See
    the tag name documentation and lib/Image/ExifTool/README for a description of these flags. For
    XMP List tags, the list type (Alt, Bag or Seq) is also output as a flag if applicable.

### BuildLangModules
    Build all [Image::ExifTool::Lang](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ALang/markdown) modules from an XML database file.

        [Image::ExifTool::TagInfoXML::BuildLangModules](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool%3A%3ATagInfoXML%3A%3ABuildLangModules/markdown)('src.xml');

    Inputs:
        0) XML file name

        1) Update flags:

            0x01 = preserve version numbers
            0x02 = update all modules, even if they didn't change
            0x04 = update from scratch, ignoring existing definitions
            0x08 = override existing different descriptions and values

    Return Value:
        Number of modules updated, or negative on error.

## AUTHOR
    Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com)

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

## SEE ALSO
    Image::[ExifTool(3pm)](https://www.chedong.com/phpMan.php/man/ExifTool/3pm/markdown), [Image::ExifTool](https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AExifTool/markdown)::[TagNames(3pm)](https://www.chedong.com/phpMan.php/man/TagNames/3pm/markdown)

