У меня есть следующий образец XML:
<finding>
<title>Found something</title>
<heading>Severity:</heading>
<text>Really low.</text>
<heading>URL:</heading>
<text>https://www.something.com:443</text>
<heading>Description:</heading>
<text>We have found an issue</text>
<heading>Impact:</heading>
<text>This is bad.</text>
<heading>Recommendations:</heading>
<text>Fix it!.</text>
</finding>
Легко ли это сделать с помощью XSLT? Я использую Python с lxml, если это помогает. Я хотел бы иметь XSLT, который даст мне следующее:
<finding>
<title>Found something</title>
<severity>Really low.</severity>
<url>https://www.something.com:443</url>
<description>We have found an issue</description>
<impact>This is bad.</impact>
<recommendations>Fix it!</recommendations>
</finding>
Спасибо!
<heading>, которые содержат произвольные небуквенно-цифровые символы. - person Dimitre Novatchev   schedule 09.08.2011