我有以下XML節點分割節點HTML段落,並希望將其拆分爲兩個節點如下:XSLT在兩個節點與HTML
<root>
<story>
<p>Headlines:<br/>1- First news headline<br/>2- Second news headline<br/>
<br/>
<br/>-------Complete story-----<br/>1- First news headline story<br/>
<br/>Some detailed news story will apprear related to first headline<br/>
<br/>
<br/>2- Second news headline story<br/>
<br/>Some details about second news story will be inserted here<br/>
</p>
</story>
</root>
以上的XML是我輸入xml和我無法改變它,因爲它是由第三方提供的。現在我想將它分成兩個節點,保留所有的html標記。輸出XML應該如下:
<root>
<headlines>
<p>Headlines:<br/>1- First news headline<br/>2- Second news headline<br/>
<br/>
<br/>-------</p>
</headlines>
<stories>
<p>Complete story-----<br/>1- First news headline story<br/>
<br/>Some detailed news story will apprear related to first headline<br/>
<br/>
<br/>2- Second news headline story<br/>
<br/>Some details about second news story will be inserted here<br/>
</p>
</stories>
</root>
你可能會觀察到原來<p></p>
標籤被分裂成兩段。請幫助正確的xslt可以轉換它。
你到目前爲止嘗試過什麼? – zx485