Convert xml to idml

898 views Asked by At

I want convert to idml from xml

XML File:

<XLSE>
<table>
<tgroup>
<thead>
<tr>
<td>Sampe</td>
<td>Sampe</td>
</tr>
</thead>
<tbody>
<tr>
<td>Sampe</td>
<td>Sampe</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Sampe</td>
<td>Sampe</td>
</tr>
</tfoot>
</tgroup>
</table>
</XLSE>

I import in indesign this file, i got xml struture in idml,

  1. how to get table format in story file without change in xml structure
  2. how will get same input tag during xml file export in indesign

please give with sample

1

There are 1 answers

0
divyanshm On

Say you want a 2x2 Table in an IDML file, the hierarchy would look something like = Story -> ParagraphStyleRange -> Table

A minimal Table element looks like this -

<Table Self="u126i190" ColumnCount="2" BodyRowCount="2" FooterRowCount="0" HeaderRowCount="0">     
    <Row Self="u126i190Row0"  Name="0"/> 
    <Row Self="u126i190Row1"  Name="1"/> 
    <Column Self="u126i190Column0" Name="0" SingleColumnWidth="47.760000000000005"/> 
    <Column Self="u126i190Column1" Name="1" SingleColumnWidth="47.760000000000005"/>
    <Cell Self="u126i190i5" Name="0:0" ColumnSpan="1" RowSpan="1"> 
        <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/NormalParagraphStyle">             
            <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]"/> 
                <Content>Row 1 Column 1</Content>
           </CharacterStyleRange>
        </ParagraphStyleRange>
    </Cell>
    <Cell Name="1:0"> .... </Cell>
    <Cell Name="0:1"> .... </Cell>
    <Cell Name="1:1"> .... </Cell>
</Table>

The value of the Name attribute for a cell is = ColumnName:RowName.