开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜