Sunday 15 September 2013

dom - How to obtain the "nodeValue" by python? -


I am trying to parse some XML files like the following:

  & Lt; Foo .. & Lt; / M1> & Lt; Foo2 CHAR = "A" NUM = "8" TYPE = "beta" & gt; & Lt; Self-Examination Questions & gt; 12345 & lt; / SEQ> & Lt; Area seq_beg = "1" seq_end = "8" & gt; & Lt; Area seq_beg = "9" seq_end = "21" & gt; & Lt; REGION seq_beg = "22" seq_end = "32" & gt; & Lt; Area seq_beg = "33" seq_end = "44" & gt; & Lt; / Foo2 & gt;   

I am able to use childNodes [x]

    

and getElementsByTag ("SEQ") or getElementsByTag ("region") How do I get the value for I use text ">

attributes ['xxx']. Value

No comments:

Post a Comment