我試圖解析使用dom
包中的XML文件,但這裏是我得到的錯誤:TCL XML解析錯誤
unterminatedattribute {invalid attribute list around line 4}
下面是簡單的測試:
package require dom;
set XML "
<Top>
<Name name='name' />
<Group number=1>
<Member name='name1' test='test1' l=100/>
</Group>
</Top>"
set doc [::dom::parse $XML]
set root [$doc cget -documentElement]
set node [$root cget -firstChild]
puts "[$node cget -nodeValue]"
我得到了一個例子,其中'<!'甚至打破了tdom的'dom parse -html' –
在它變得完全無法解析之前,有多少破損可以嘔吐到「文檔」中。 [除了REs。](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) –