org.apache.xmpbox.xml

## Class XmpSerializer

- java.lang.Object
- - org.apache.xmpbox.xml.XmpSerializer

    public class XmpSerializer
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`XmpSerializer()` Default constructor.
`XmpSerializer(TransformerFactory transformerFactory, DocumentBuilderFactory documentBuilderFactory)` Constructor to be used if other factories than the default ones are needed.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected Element` `createRdfElement(Document doc, XMPMetadata metadata, boolean withXpacket)`
`void` `serialize(XMPMetadata metadata, OutputStream os, boolean withXpacket)`
`void` `serializeFields(Document doc, Element parent, List<AbstractField> fields, String resourceNS, String prefix, boolean wrapWithProperty)`
`protected Element` `serializeSchema(Document doc, XMPSchema schema)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XmpSerializer

    public XmpSerializer()

Default constructor.

#### XmpSerializer

    public XmpSerializer(TransformerFactory transformerFactory,
                         DocumentBuilderFactory documentBuilderFactory)

Constructor to be used if other factories than the default ones are needed.

Parameters:
  `transformerFactory` - transformer factory to be used
  `documentBuilderFactory` - document builder factory to be used

### Method Detail

#### serialize

    public void serialize(XMPMetadata metadata,
                          OutputStream os,
                          boolean withXpacket)
                   throws TransformerException

Throws:
  `TransformerException`

#### serializeSchema

    protected Element serializeSchema(Document doc,
                                      XMPSchema schema)

#### serializeFields

    public void serializeFields(Document doc,
                                Element parent,
                                List<AbstractField> fields,
                                String resourceNS,
                                String prefix,
                                boolean wrapWithProperty)

#### createRdfElement

    protected Element createRdfElement(Document doc,
                                       XMPMetadata metadata,
                                       boolean withXpacket)