将xml转换为idml

时间:2012-10-11 07:17:44

标签: xml perl idml

我想从xml转换为idml

XML文件:

<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>

我在indesign中导入这个文件,我在idml中得到了xml struture,

  1. 如何在故事文件中获取表格格式而不更改xml结构
  2. 如何在indesign中导出xml文件时获取相同的输入标记
  3. 请提供样品

1 个答案:

答案 0 :(得分:1)

假设您想在IDML文件中使用2x2表,则层次结构看起来像= Story - &gt; ParagraphStyleRange - &gt;表

最小的Table元素如下所示 -

<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>

单元格的Name属性的值为= ColumnName:RowName。