Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-13-2012, 06:13 PM   PM User | #1
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Help Validating XHTML Strict 1.0

Need some help validating this,can't seem to find the error at all...

Its for college btw.

Error taken from W3 Schools XHTML Validator
Error Line 99, Column 7: end tag for "div" omitted, but OMITTAG NO was specified

</body>


You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".


Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

     <head>
         <title>BF3</title>
		<link rel="stylesheet" type="text/css" href="Project.css"/>
     </head>


<body>


 <div id="page">
<img src="Fields_wallpapers_411.jpg"alt="Top Part" height="300" width="1000"/>
 <div id="nav_bar">
    <ul>
        <li><a href="index.html">Home       </a></li>
        <li><a href="tickets.html">Weapons  </a></li>
        <li><a href="members.html" class="Classes">
            Maps</a></li>
        <li><a href="about_us.html">Vehicles</a></li>
        <li><a href="about_us.html">Factions</a></li>
        <li><a href="about_us.html">Tips &amp; Tricks</a></li>
    </ul>
</div>


<div id="homepage">


<div id="title"><h2>Welcome to my Battlefield 3 site.</h2></div>
<p>Battlefield 3 (commonly abbreviated BF3) is a first-person shooter video game developed by EA Digital Illusions CE and published by Electronic Arts.
It is a direct sequel to 2005's Battlefield 2, and the twelfth installment in the Battlefield franchise.


The game was released in North America on 25 October 2011 and in Europe on 28 October 2011 for Microsoft Windows, PlayStation 3, and Xbox 360.
EA Mobile also confirmed a port for the iOS platform. The game sold 5 million copies in its first week of releaseand received critical acclaim from most game reviewers.
It is the first game in the series that does not support versions of Windows prior to Windows Vista as the game only supports DirectX 10 and 11.
The PC version is exclusive to EA's Origin platform,through which PC users also authenticate when connecting to the game.

In campaign mode, players take on the personas of several military roles; a Force Recon Marine, an F/A-18 weapons system officer,
an M1A2 Abrams tank operator, and a GRU Spetsnaz operative. The campaign takes place at various locations, from Iran to New York,
 and follows the story of Sergeant Henry Blackburn and later, Dimitri Mayakovsky. </p>




<h2> Campaign </h2>
<p>The game's campaign takes place in the year 2014. The missions are flashbacks that are part of the interrogation of Staff Sergeant Blackburn and do not occur in order of events.
Chronologically, the initial sections of the campaign are set near the Iraq-Iran border, where the US Marine Corps are fighting the People's Liberation and Resistance (PLR).
The game later moves into northern Iran, continuing the fight against the PLR. There is a mission set in the streets of Paris, and another set in the sewers and subways of New York.</p>


<div id="review">

  <h2> <a href="http://battlelog.battlefield.com/bf3/about/game/armored-kill/">Armored Kill OUT NOW</a></h2>


      <p><i>OnPS3,XBOX 360 & PC       </i></p>



         <img src="Armoud Kill.png"alt="Top Part"/>
 </div>


<p>Click Below Image to Order Now<a href="http://battlelog.battlefield.com/bf3/premium/">
<img src="Battlefield-3-Premium.jpg" alt="Preium" width="480" height="500"/></a></p>






<h2>Downloadable Content</h2>
 <ol>
    <li><i>Back To Karkand   </i></li>
    <li><i>Close Quaters     </i></li>
    <li><i>Amored Kill       </i></li>
    <li><i>Aftermath         </i></li>
    <li><i>Endgame           </i></li>
 </ol>




<img src="bf3_small_feature_promo_usp1.jpg"alt="Top Part" height="300" width="350"/>

  <img src="bf3_small_feature_promo_usp2.jpg"alt="Top Part" height="300" width="280"/>

     <img src="bf3_small_feature_promo_usp3-2.jpg"alt="Top Part" height="300" width="360"/>


</div>



</body>

</html>
Yedya is offline   Reply With Quote
Old 12-14-2012, 07:39 AM   PM User | #2
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
We have a policy of not doing other people's homework, but we do offer hints.

Usually when I have a well-formedness problem like this that I can't solve, I make a copy of the document in question. Then I take the copy and start removing sections that I know are good. Eventually, I'll isolate where I went wrong. This is a technique that works really well in any scripting language, too.

Another option is to use an editor that supports either code folding or syntax highlighting. Komodo Edit does both, and it's free: I've used it for years. I suspect that with code folding, you'll find the error within minutes.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Old 12-14-2012, 01:34 PM   PM User | #3
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Ok thanks can you suggest and editor? Seeing as its only one error can you give me a BIG Clue,need to get this validated today
Yedya is offline   Reply With Quote
Old 12-14-2012, 03:12 PM   PM User | #4
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
It's telling you that you have opened a <div> but have not closed it with a corresponding </div>. You could count the <div> elements and see there is one less </div>. Just pair them up and decide where you forgot a <div>. You could also put a comment (like <!-- end of "page" div -->) at each of the </div> and it might make it easier to spot a missing one.

Dave
tracknut is offline   Reply With Quote
Old 12-14-2012, 06:13 PM   PM User | #5
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
Quote:
Originally Posted by Yedya View Post
Ok thanks can you suggest and editor? Seeing as its only one error can you give me a BIG Clue,need to get this validated today
I already did, Komodo Edit: http://www.activestate.com/komodo-edit/downloads

P.S. When I tried your document in Komodo, it wasn't just one error... that's how XML works: at the first well-formedness error, it stops processing.

P.P.S. Try http://validator.w3.org/#validate_by_upload for validation. :-)
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog

Last edited by Alex Vincent; 12-14-2012 at 06:17 PM..
Alex Vincent is offline   Reply With Quote
Old 12-14-2012, 06:14 PM   PM User | #6
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Thank you! Fixed the error and now the validator is throwing out more errors
Quote:
Line 62, Column 35: Couldn't find end of Start Tag img line 62
<img src="Armoud Kill.png"alt="Top Part"/>
6 of these? and i honestly don't see where its wrong in the code...
Yedya is offline   Reply With Quote
Old 12-14-2012, 06:20 PM   PM User | #7
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
Code:
<img src="Armoud Kill.png"alt="Top Part"/>
What's wrong here?
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Old 12-14-2012, 06:54 PM   PM User | #8
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Quote:
Originally Posted by Alex Vincent View Post
Code:
<img src="Armoud Kill.png"alt="Top Part"/>
What's wrong here?
Nothing according to this


Code:
<img border="0" src="/images/pulpit.jpg" alt="Pulpit rock" width="304" height="228">
taking from


http://www.w3schools.com/html/tryit....ml_pulpitimage


I actually am so stressed now
Yedya is offline   Reply With Quote
Old 12-14-2012, 07:40 PM   PM User | #9
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Not seeing any error this is so stressful


I checked on w3 shools and according to that site thats thew way your meant to link images.
Yedya is offline   Reply With Quote
Old 12-14-2012, 07:54 PM   PM User | #10
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Let'ssee,howdoIputthismoreclearly.Stepbackandlookatthecodeasfarasitneedstobeparsedintoindividualtags ,attributesandstrings...Dave
tracknut is offline   Reply With Quote
Old 12-14-2012, 08:06 PM   PM User | #11
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Quote:
Originally Posted by tracknut View Post
Let'ssee,howdoIputthismoreclearly.Stepbackandlookatthecodeasfarasitneedstobeparsedintoindividualtags ,attributesandstrings...Dave
So it needs to be parsed into individual tags? I have no idea how to do that..
Im not asking for alot,just a few simeple errors...im new to programming



Guess il go google it.
Yedya is offline   Reply With Quote
Old 12-14-2012, 08:15 PM   PM User | #12
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Sorry, I thought that would have given you the tip. Tags and attributes in html are separated by white space (spaces, tabs, returns) so that your browser knows where they start and end. The formatting of html is rather loose, but you do need to adhere to a few common rules like that. That line of code is missing white space between the string and the following attribute.

Dave
tracknut is offline   Reply With Quote
Old 12-14-2012, 08:22 PM   PM User | #13
Yedya
New to the CF scene

 
Join Date: Dec 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Yedya is an unknown quantity at this point
Many thanks man! Really appreciate it,its passed now
Yedya is offline   Reply With Quote
Old 12-14-2012, 09:52 PM   PM User | #14
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
So, what'd you learn from this? Don't just quote Dave - put it in your own words.

(I'm in college myself - but I enjoy taking the role of a mentor from time to time.)
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:09 PM.


Advertisement
Log in to turn off these ads.