XSLT - xml Geschwisterelemente neu ordnen bzw. schachteln

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • XSLT - xml Geschwisterelemente neu ordnen bzw. schachteln

    Hallo Miteinander,

    ich möchte xml Geschwisterelemente neu ordnen bzw. schachteln.

    Folgendes Beispiel:

    <root>
    <p typ="titel">1. Titel</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="titel">2. Titel</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    </root>

    soll zu folgendem Ergebnis werden:

    <root>
    <dokumet>
    <p typ="titel">1. Titel</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    </dokumet>
    <dokumet>
    <p typ="titel">2. Titel</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    <p typ="text">Blabla</p>
    </dokumet>
    </root>


    Besten Dank für eurte Hilfe.
    derjuergen