zoukankan      html  css  js  c++  java
  • Warning: simplexml_load_string(): Entity: line 432: parser error : EntityRef: expecting ';'

    Warning: simplexml_load_string(): Entity: line 432: parser error : EntityRef: expecting ';' 

    character is used in XML to insert a character reference with syntax &name; (note ; after name). Parser expects a ; but it can't find it (there are more available delimiters, this is just most common case).

    Solution is then escaping (how it's done depends on language you use to generate that XML file) but final result must be something like this:

    <url>
      <loc>http://www.ezed.in/ezed/courseDemoIntroPage.do?courseId=COU10000000138003530&amp;checkingCourseFrom=preLogin#.U2DcKvmSySo</loc>
    </url>

    Note that plain & has been replaced with its escaped version &amp;. For further details see this simple article.

    Another possible solution (if you don't want/you can't escape) is to enclose URL inside a CDATA section like this:

    <url>
      <loc><![CDATA[http://www.ezed.in/ezed/courseDemoIntroPage.do?courseId=COU10000000138003530&checkingCourseFrom=preLogin#.U2DcKvmSySo]]></loc>
    </url>
    原文链接:http://stackoverflow.com/questions/23422316/xml-validation-error-entityref-expecting
  • 相关阅读:
    C++的虚函数与多态
    Qt界面的个性设置QSS
    Qt添加背景图片应该注意的问题
    c/c++的函数参数与返回值
    堆和栈
    linux下挂载u盘
    Qt的主窗口弹出消息框
    智能家居实训系统的项目有感!
    Qt 快捷键
    FB
  • 原文地址:https://www.cnblogs.com/zhiguopingtianxia/p/5036691.html
Copyright © 2011-2022 走看看