说我有一个html表:
<table border="1">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
</table>
&#13;
使用python包simplekml将这个html位插入kml弹出窗口的最简单/最好的方法是什么?
答案 0 :(得分:1)
刚刚找到它。说明和balloonstyle接受Html标记。
kml = simplekml.Kml(open=0) # open a file
pfol = kml.newfolder(name='foo',open=0) # start a folder
pol = pfol.newpoint(name= 'bar') # define a point
pol.balloonstyle.text = '<HTMLTABLE>' # insert html
pol.description = 'my point'