Zum Inhalt springen

XML Cookbook

Kurzbeschreibung

Dieses Cookbook dient als schnelle Referenz für den grundsätzlichen Aufbau einer Dokumentvorlage.

Die Beispiele zeigen bewusst nur den notwendigen XML-Code und verzichten weitgehend auf Erklärungen.

Ausführliche Informationen finden Sie in den jeweiligen Fachartikeln.

Minimale Dokumentvorlage

XML-Suche: Document · Body · Block · Content · Text

<Document>

    <Body>

        <Block>

            <Content>

                <Text Content="Hallo Welt">
                </Text>

            </Content>

        </Block>

    </Body>

</Document>

Einfacher Block

XML-Suche: Block · Content · Text

<Block>

    <Content>

        <Text Content="Ein Absatz">
        </Text>

    </Content>

</Block>

Block mit BlockProperties

XML-Suche: Block · BlockProperties · Spacing · Before · After · Content · Text

<Block>

    <BlockProperties>

        <Spacing Before="200" After="200">
        </Spacing>

    </BlockProperties>

    <Content>

        <Text Content="Absatz mit Abstand">
        </Text>

    </Content>

</Block>

Block frei positionieren

XML-Suche: Block · BlockProperties · Frame · PositionX · PositionY · Content · Text

<Block>

    <BlockProperties>

        <Frame
            PositionX="100"
            PositionY="100">
        </Frame>

    </BlockProperties>

    <Content>

        <Text Content="Frei positionierter Text">
        </Text>

    </Content>

</Block>

Neuer Dokumentabschnitt

XML-Suche: SectionProperties · SectionType · PageSize · Width · Height

<SectionProperties SectionType="nextPage">

    <PageSize>

        <Width>11906</Width>

        <Height>16838</Height>

    </PageSize>

</SectionProperties>

Seitenränder

XML-Suche: PageMargins · Top · Bottom · Left · Right

<PageMargins>

    <Top>1417</Top>

    <Bottom>1134</Bottom>

    <Left>1417</Left>

    <Right>1417</Right>

</PageMargins>

Papierquelle

XML-Suche: PaperSource · FirstName · OtherName · First · Other

<PaperSource
    FirstName="Logo"
    OtherName="Standard">

    <First>0</First>

    <Other>0</Other>

</PaperSource>

Kopfzeile einbinden

XML-Suche: Headers · ElementRef · RefId

<Headers>

    <ElementRef>

        <RefId>

            ...

        </RefId>

    </ElementRef>

</Headers>

Fußzeile einbinden

XML-Suche: Footers · ElementRef · RefId

<Footers>

    <ElementRef>

        <RefId>

            ...

        </RefId>

    </ElementRef>

</Footers>

Zwei Dokumentabschnitte

XML-Suche: Body · SectionProperties · SectionType

<Body>

    ...

    <SectionProperties SectionType="nextPage">

        ...

    </SectionProperties>

    ...

</Body>

Kommentar

XML-Suche: Body · Comment

<Body>

    <Comment>

        Dokumentation

    </Comment>

</Body>

Summary

XML-Suche: Body · Summary · Variable · Path

<Body>

    <Summary>

        <Variable Path="source.Versichertennummer">
        </Variable>

    </Summary>

</Body>

Deaktivierter XML-Bereich

XML-Suche: Body · Disabled

<Body>

    <Disabled>

        ...

    </Disabled>

</Body>

XML-Dokument strukturieren

XML-Suche: Document · Body · Block · Content · SectionProperties

Document

└── Body

    ├── Block

    │   └── Content

    ├── Block

    │   └── Content

    └── SectionProperties

Merksätze

Body

Enthält den eigentlichen Dokumentinhalt.

Block

Bildet einen zusammengehörenden Dokumentbereich. Block in Block ist nicht erlaubt.

Content

Enthält die auszugebenden Inhalte.

BlockProperties

Formatieren den gesamten Block.

SectionProperties

Definieren das Seitenlayout eines Dokumentabschnitts.

💡 Tipp

Die Beispiele zeigen bewusst nur den notwendigen XML-Code.

In der Praxis werden diese Strukturen häufig mit Bedingungen, Variablen, Tabellen oder Funktionen kombiniert.

Ausführliche Informationen finden Sie in den jeweiligen Fachartikeln.

Zuletzt aktualisiert am