簡體   English   中英

如何在R中解析嵌入在xml中的html?

[英]How to parse html embedded in xml in R?

我有一個輸入文件,其中包含嵌入在xml中的html標記

 <Root>
   <Section1>
   <p>some text</p>
   <br>
   <table>
       <th></th>
       <tr>
       <td></td> 
       </tr>    
   </table>
   </Section1>
  <Section2>
  <ol>
      <li>1</li>
      <li>2</li>
      <li>3</li>
  </ol>
  </Section2>
</Root>

有沒有辦法解析嵌入在Rml中的xml文檔中的html?

如果它的XHTML那么它應該是XML,所以你使用標准的XML解析器。 你可以在其他地方找到很多。

請注意, <Section1>標記未正確關閉。 如果這是您粘貼的文件,則表示存在問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM