【发布时间】:2013-07-14 08:34:18
【问题描述】:
我想从父标签styling 中提取属性lang 值。我如何获得这个?
我正在使用 libxml。
我试过getAttribute,但它在父标签上不起作用。
<styling lang="en-US">
<style id="jason" tts:color="#00FF00" />
<style id="violet" tts:color="#FF0000" />
<style id="sarah" tts:color="#FFCC00" />
<style id="eileen" tts:color="#3333FF" />
</styling>
【问题讨论】:
标签: xml perl xml-parsing