berniebert
Grünschnabel
Hallo zusammen,
ich möchte mit xslt eine XML-file in eine andere XML-file transformieren. Die Output-file ist ein Auszug aus der Input-file. Sie soll alle Elemente <book type="novel"> (inkl aller Attribute) sowie dessen Children <author> (inkl aller Children, Attribute, etc) enthalten. Wie kriege ich das hin? Hat jemand einen Tipp oder Codeschnipsel? Vielen Dank! B
input:
output:
ich möchte mit xslt eine XML-file in eine andere XML-file transformieren. Die Output-file ist ein Auszug aus der Input-file. Sie soll alle Elemente <book type="novel"> (inkl aller Attribute) sowie dessen Children <author> (inkl aller Children, Attribute, etc) enthalten. Wie kriege ich das hin? Hat jemand einen Tipp oder Codeschnipsel? Vielen Dank! B
input:
Code:
<shelf>
<book type="novel">
<author><name>Kipling</name></author>
<year>1851</year>
<title>moby dick</title>
</book>
<book type="drama">
<author><name>Shakespeare</name></author>
<year>...</year>
...
</book>
</shelf>
output:
Code:
<shelf>
<book type="novel">
<author><name>Kipling</name></author>
</book>
</shelf>