好手帮忙:xml标签中有""不能够把相应的标签解析出来,求帮忙
高手帮忙:xml标签中有":",不能够把相应的标签解析出来,求帮忙
<yweather:forecast day=\"Sun\" date=\"1 Jan 2012\" low=\"18\" high=\"37\" text=\"Partly Cloudy\" code=\"30\" />
不能通过getElementsByTagName("yweather:forecast")解析出来,在普通的IE,FireFox上都可以解析出来,但是直接用webkit的核不能解析。
求帮忙。
------解决方案--------------------
解决了一半,yweather是一个命名空间,forecase是一个元素名称,解析的时候直接使用getElementsByTagName("forecast")即可。
但是如果我只想要得到yweather空间下的forecase,应该怎么表示?
<yweather:forecast day=\"Sun\" date=\"1 Jan 2012\" low=\"18\" high=\"37\" text=\"Partly Cloudy\" code=\"30\" />
不能通过getElementsByTagName("yweather:forecast")解析出来,在普通的IE,FireFox上都可以解析出来,但是直接用webkit的核不能解析。
求帮忙。
------解决方案--------------------
解决了一半,yweather是一个命名空间,forecase是一个元素名称,解析的时候直接使用getElementsByTagName("forecast")即可。
但是如果我只想要得到yweather空间下的forecase,应该怎么表示?