XMLSerializable (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.io.xml

## Interface XMLSerializable

- All Known Subinterfaces:
    ApplicationPluginObject
  All Known Implementing Classes:
    AAFElement, AAFStream, AES3PCMDescriptorImpl, AIFCDescriptorImpl, ANCDataDescriptorImpl, ApplicationObjectImpl, ApplicationPluginObjectImpl, ApplicationReferencedObjectImpl, AUIDImpl, AuxiliaryDescriptorImpl, AVCSubDescriptorImpl, BWFImportDescriptorImpl, CDCIDescriptorImpl, ClassDefinitionImpl, ConstantValueImpl, ContentStorageImpl, ContributorImpl, ControlPointImpl, CPSystemItemImpl, DataEssenceDescriptorImpl, DefaultFadeImpl, DeltaEntryImpl, DictionaryImpl, EdgeCodeValueImpl, EssenceElementImpl, EventTrackImpl, IndexEntryImpl, KLVDataImpl, LocatorImpl, MPEGVideoDescriptorImpl, NetworkLocatorImpl, OrganisationImpl, PackageIDImpl, PersonImpl, PolyFileDescriptorImpl, ProductVersionImpl, PropertyDefinitionImpl, PropertyWrapperDefinitionImpl, RandomIndexItemImpl, RationalImpl, RGBAComponentImpl, RIFFChunkImpl, SimpleDescriptionImpl, SourceReferenceValueImpl, StaticTrackImpl, SubDescriptorImpl, TextLocatorImpl, TimecodeValueImpl, TimelineTrackImpl, TimeStampImpl, TrackImpl, TypeDefinitionObjectReferenceImpl, TypeDefinitionStrongObjectReferenceImpl, TypeDefinitionVariableArrayImpl, TypeDefinitionWeakObjectReferenceImpl, VBIDataDescriptorImpl

      public interface XMLSerializable

  Specifies a class that can add comments and extra element to its current value to nodes of an XML DOM tree. All metadata objects can serialize themselves as XML using their symbol names. If this interface is implemented, a descriptive comment can be added and additional child nodes created.

  See Also:
    `XMLFactory`, `XMLBuilder.toXML(tv.amwa.maj.industry.MetadataObject)`, `ClassDefinition.getSymbol()`, `PropertyDefinition.getSymbol()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendXMLChildren(Node parent)` Append extra child elements to the given parent node to serialize the value of an object to an XML fragment.
    `String` | `getComment()` Include a comment when serializing a value to XML.

- - ### Method Detail

    - #### appendXMLChildren

          void appendXMLChildren(Node parent)

      Append extra child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the `XMLBuilder` class are provided to help with this process.

      Parameters:
        `parent` - XML parent element to append child nodes to.

    - #### getComment

          String getComment()

      Include a comment when serializing a value to XML. The comment will be inserted as the first child node of the element representing the class.

      Returns:
        Comment to add as the first child node of the element representing this class.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.