XML DOM parsing br tag
I need to parse a xml string to obtain the开发者_开发百科 xml DOM, the problem I'm facing is with the self closing html tag like <br /> giving me the error of Tag mismatch expected </br>.
I'm aware this can be overcome by using <br></br> instead of <br /> in the string, but is there a way this can be done without making the above change.
please help...
- Rob
The self closing tag is entirely valid. I suspect you have a mismatched element elsewhere in your XML.
Tag mismatch expected </br>
means you have forgotten to self-close the element. <br/> is just fine, but I think you've missed one or more HTML-style <br>s in your document. If you don't get a line number from your parser, you can always try loading the XML into a browser or validator to get a hint of where the problem is.
加载中,请稍侯......
精彩评论