WordPress.org

Support

Support » Installation » XML Parsing Error

XML Parsing Error

Viewing 7 replies - 1 through 7 (of 7 total)
  • There’s a patch on Tack ticket 7624 that may solve your problem.

    According to the patch you need to add a line of code to wp-admin/includes/export.php

    dandr69

    @dandr69

    This is not working for me.
    I checked for blank spaces, now I added the line to this file…
    The RSS is still broke.
    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.blog4it.com/index.php/feed
    Line Number 3, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?>
    ^

    whooami

    @whooami

    Member

    look at the source of your front page — the same blank space appears there as does that feed page (if you view it’s source).

    Disable your plugins one by one, while refreshing one of those pages, and see when the blank space disappears. It’s white space in a plugin file, and disabling that plugin will cause that to go away.

    I tried disabling each of the plugins but am still getting the same error message:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.wellbeingcheckwaterlooregion.ca/feed/
    Line Number 2, Column 21: <?xml version=”1.0″ encoding=”UTF-8″?>
    ——————–^

    I’ve looked for blank space in all the plugins, theme files and WordPress files. Does anyone have any other suggestions?

    By removing blanks at the end of all of the php files in the installed Theme, the error is gone now.

    I found the error through Functions.php. Also, it depends on yoru site layout — I found out that I busted the feed through having 2 calls to the dynamic sidebars (as I was using 2 separate designs). You don’t need two arrays for the dynamic sidebars, everything should be in one array (am I terming this correctly? I’m talking about:

    ‘<?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’, ));
    ));
    ?>’

    so don’t just check the files for spaces (that may be moot). Make sure the PHP is valid in the functions file.

    yes i had the same problem. it worked in explorer and not in firefox. Have a look at the source and you can find the error they are talking about and do a search (mine was on line 1 column 2). Mine was the feed-rss2.php file so i opened it and found this line break, between ?> <?php, to be my culprit..

    header(‘Content-Type: text/xml; charset=’ . get_option(‘blog_charset’), true);
    $more = 1;
    ?>
    <?php echo ‘<?xml version=”1.0″ encoding=”‘.get_option(‘blog_charset’).'”?’.’>’; ?>

    should be…

    header(‘Content-Type: text/xml; charset=’ . get_option(‘blog_charset’), true);
    $more = 1;
    ?><?php echo ‘<?xml version=”1.0″ encoding=”‘.get_option(‘blog_charset’).'”?’.’>’; ?>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘XML Parsing Error’ is closed to new replies.
Skip to toolbar