2
我需要從節點中的文本中獲取一個字符串數組,該節點本身由xml文件中的其他元素剪切。我使用libxml2庫在C中工作。XML:從文本中獲取字符串數組
例:
<option>some text <middletag />other text</option>
我試着用xmlNodeGetContent(xmlnode);
但我只得到一個字符串像"some text other text"
。
問題是:是否有可能得到一個字符串數組,這個例子將是{"some text ", "other text"}
?