XML parsing errors 6 to fix anybody help

Discussion in 'HTML & Website Design' started by choice, Feb 2, 2008.

  1. #1
    I cant get rid of 6 xml parsing errors on my blog anybody got any ideas

    here are the errors
     
    choice, Feb 2, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try the attached code, i had to attach it as it was too long.
     

    Attached Files:

    nicangeli, Feb 2, 2008 IP
  3. choice

    choice Prominent Member

    Messages:
    5,444
    Likes Received:
    490
    Best Answers:
    0
    Trophy Points:
    350
    Digital Goods:
    2
    #3
    i would i enter that code into my site

    the homepage is made up of several files

    home.php
    sidebar.php
    l_sidebar
    r_sidebar
    header and footer etc etc
     
    choice, Feb 2, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok. Find the following line in your code,

    
    <p> <img src="http://www.generalmarketingblog.com/wp-content/uploads/2008/01/002_09.jpg" alt="002_09.jpg" align="left" /><span>So you have decided you want to have an opt-in newsletter, but remember it is not only about sending your readers your latest newsletters or catalogs. There are a lot of things to consider avoiding having any complications. There are lots of ways to get readers to opt-in to your list, but there are also things you want to avoid to stop them wanting to opt-out of your list. <a href="http://www.generalmarketingblog.com/3-things-you-must-not-do-when-emailing-your-list#more-69" class="more-link">Read the story &raquo;</a></p>
    
    Code (markup):
    and add a </span> tag before the </p>

    That should sort it!
     
    nicangeli, Feb 2, 2008 IP
  5. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Follow the Validator report -- There is a missing span closure on line 198. Once you fix that as follows ......... Read the story &raquo;</a></span></p> .......... the page will validate -- the XML errors cascade from the error above and will disappear when it is fixed.

    James
     
    jamesicus, Feb 2, 2008 IP
  6. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well that's what i said, anyway, OP the error will probably not be on line 198 as your code is split into diff files, if you cannot find the correct line post the .php files here.
     
    nicangeli, Feb 2, 2008 IP
  7. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No, there is only the one document being Validated -- I corrected the error on line 198 and the document passed re-validation.

    For Grouse:

    It seems you have now added some more </span> elements incorrectly on other lines, thus the increase of Validation errors to ten. I have corrected them all and sent the valid code to you via e-mail.

    James
     
    jamesicus, Feb 2, 2008 IP
  8. choice

    choice Prominent Member

    Messages:
    5,444
    Likes Received:
    490
    Best Answers:
    0
    Trophy Points:
    350
    Digital Goods:
    2
    #8
    i`m back to 6 errors now

    here is the offending file

    <?php get_header(); ?>
    
    
    
    <div id="content">
    
    
    
    	<div id="homepage">
    
    				
    
    		<div id="homepageleft">
    
    		
    
    			<div class="featured">
    
    				<?php $recent = new WP_Query("cat=4&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    
    				<?php endwhile; ?>
    
    			</div>
    
    			
    
    			<div class="featured">
    
    				<?php $recent = new WP_Query("cat=12&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    
    				<?php endwhile; ?>
    
    			</div>
    
    			
    
    			<div class="featured">
    
    				<?php $recent = new WP_Query("cat=197&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    				<?php the_content(__('Read the story &raquo;'));?><div style="clear:both;"></div>
    
    				<?php endwhile; ?>
    
    			</div>
    
    				
    
    		</div>
    
    		
    
    		<div id="homepageright">
    
    		
    
    			<div class="section">
    
    			<h2>Blogging Tips</h2>
    
    		
    
    				<?php $recent = new WP_Query("cat=4&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
    
    				<?php the_content_limit(130, ""); ?>
    
    				
    
    				<div class="hppostmeta">
    
    					<p><?php the_time('F j, Y'); ?> | <a href="<?php the_permalink() ?>" rel="bookmark">Read the story &raquo;</a><span/></p>
    
    				</div>
    
    				
    
    				<?php endwhile; ?>
    
    			</div>
    
    		
    
    			<div class="section">
    
    			<h2>Website Promotion</h2>
    
    		
    
    				<?php $recent = new WP_Query("cat=12&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
    
    				<?php the_content_limit(130, ""); ?>
    
    				
    
    				<div class="hppostmeta">
    
    					<p><?php the_time('F j, Y'); ?> | <a href="<?php the_permalink() ?>" rel="bookmark">Read the story &raquo;</a></p>
    
    				</div>
    
    				
    
    				<?php endwhile; ?>
    
    			</div>
    
    		
    
    			<div class="section">
    
    			<h2>Other Headlines</h2>
    
    		
    
    				<?php $recent = new WP_Query("cat=10&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
    
    				<?php the_content_limit(130, ""); ?>
    
    				
    
    				<div class="hppostmeta">
    
    					<p><?php the_time('F j, Y'); ?> | <a href="<?php the_permalink() ?>" rel="bookmark">Read the story &raquo;</a></p>
    
    				</div>
    
    				
    
    				<?php endwhile; ?>
    
    			</div>
    
    			
    
    		</div>
    
    		
    
    	</div>
    
    	
    
    <?php include(TEMPLATEPATH."/sidebar.php");?>
    
    		
    
    </div>
    
    
    
    <!-- The main column ends  -->
    
    
    
    <?php get_footer(); ?>
    Code (markup):
     
    choice, Feb 2, 2008 IP
  9. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I owe you (and nicangeli) an apology -- I didn't check your original post thoroughly enough and missed that you were trying to find out what errors in your PHP file were causing your XHTML document to fail Validation. I just corrected the line 198 Validation error which of course produced a successful re-validation. Sorry.

    I did spot one error in the PHP code (above quoted extract) -- it should be:

    <div class="hppostmeta"> .......... Read the story &raquo;</a></span></p>

    James
     
    jamesicus, Feb 3, 2008 IP