Class XmlMailMergeDataTable

  • All Implemented Interfaces:
    com.aspose.words.IMailMergeDataSource

    public class XmlMailMergeDataTable
    extends java.lang.Object
    implements com.aspose.words.IMailMergeDataSource

    Überschrift: XmlMailMergeDataTable.

    Beschreibung: Klasse für das Zusammenfügen von Tabellendaten.

    Copyright: Copyright (c) ELO Digital Office GmbH 2018

    • Constructor Summary

      Constructors 
      Constructor Description
      XmlMailMergeDataTable​(org.w3c.dom.Document xmlDoc, java.lang.String tableName)
      Creates a new XmlMailMergeDataSource for the specified XML document and table name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.aspose.words.IMailMergeDataSource getChildDataSource​(java.lang.String tableName)
      If the data source contains nested data this method will be called to retrieve the data for the child table.
      java.lang.String getTableName()
      The name of the data source.
      boolean getValue​(java.lang.String fieldName, java.lang.Object[] fieldValue)
      Aspose.Words calls this method to get a value for every data field.
      boolean moveNext()
      Moves to the next record in a collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XmlMailMergeDataTable

        public XmlMailMergeDataTable​(org.w3c.dom.Document xmlDoc,
                                     java.lang.String tableName)
                              throws java.lang.Exception
        Creates a new XmlMailMergeDataSource for the specified XML document and table name.
        Parameters:
        xmlDoc - The DOM object which contains the parsed XML data.
        tableName - The name of the element in the data source where the data of the region is extracted from.
        Throws:
        java.lang.Exception
    • Method Detail

      • getTableName

        public java.lang.String getTableName()
        The name of the data source. Used by Aspose.Words only when executing mail merge with repeatable regions.
        Specified by:
        getTableName in interface com.aspose.words.IMailMergeDataSource
        Returns:
        Table name
      • getValue

        public boolean getValue​(java.lang.String fieldName,
                                java.lang.Object[] fieldValue)
                         throws java.lang.Exception
        Aspose.Words calls this method to get a value for every data field.
        Specified by:
        getValue in interface com.aspose.words.IMailMergeDataSource
        Parameters:
        fieldName - Field name
        fieldValue - Field value
        Returns:
        Result
        Throws:
        java.lang.Exception
      • moveNext

        public boolean moveNext()
        Moves to the next record in a collection. This method is a little different then the regular implementation as we are walking over an XML document stored in a DOM.
        Specified by:
        moveNext in interface com.aspose.words.IMailMergeDataSource
        Returns:
        End of file reached
      • getChildDataSource

        public com.aspose.words.IMailMergeDataSource getChildDataSource​(java.lang.String tableName)
                                                                 throws java.lang.Exception
        If the data source contains nested data this method will be called to retrieve the data for the child table. In the XML data source nested data this should look like this:
        Specified by:
        getChildDataSource in interface com.aspose.words.IMailMergeDataSource
        Parameters:
        tableName - Name of the table
        Throws:
        java.lang.Exception