WordPress.org

Ready to get started?Download WordPress

Forums

XML Parsing Error (8 posts)

  1. younghussyalex
    Member
    Posted 5 years ago #

    XML Parsing Error: prefix not bound to a namespace
    Location: http://mydomain.com/blog/wp-content/uploads/2008/09/wordpress.2008-09-27.xml
    Line Number 259, Column 1:<excerpt:encoded><![CDATA[]]></excerpt:encoded>

    Anyone know how to resolve this? I'm trying to import a wordpress xml file.

  2. MichaelH
    Member
    Posted 5 years ago #

    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

  3. dandr69
    Member
    Posted 5 years ago #

    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"?>
    ^

  4. whooami
    Member
    Posted 5 years ago #

    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.

  5. cajon
    Member
    Posted 5 years ago #

    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?

  6. cajon
    Member
    Posted 5 years ago #

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

  7. stonegauge
    Member
    Posted 5 years ago #

    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.

  8. daleyboy50
    Member
    Posted 5 years ago #

    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').'"?'.'>'; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.