我想將xml數據轉換爲html。下面是示例XML數據,我想要以html格式獲取/轉換它。將xml轉換爲html使用php
<content type="html">
<paragraph id="1291266887">
<div class="red">
<span id="main_post_id">
<p>ten post przedstawia jak wysłać znaczników w ust <strong>Ling</strong> - xyz</p>
<p>tags znane jako <span class="translation_section section_2">bezpieczne</span>, będą traktowane jako sekcje pkt</p>
<p>innych materiałów dzielą się na <em>literach</em></p>
</span>
</div>
</paragraph>
</content>
即我想獲得所有的代碼之間包含<paragraph id="..."></paragraph>
。我想用php做。當我使用php將其轉換爲數組時,它將以div,p,span的數組形式提供所有數據。但是我希望<paragraph>..</paragraph>
標籤中包含的整個html包含在一個數組中。
請幫助需要在這裏。讓我知道最好的方法。
謝謝。
創建 文件我想用php做。當我使用php將其轉換爲數組時,它將以div,p,span的數組形式提供所有數據。但我希望整個HTML中包含 .. 標籤在一個單一的數組。 –
gautamlakum
2010-12-02 06:52:39