Click here to Skip to main content
15,112,866 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
 <siteMapNode url="http://voiceyouropinions.net/" title="Voice Your Opinions"  description="Voice Your Opinions">
    <siteMapNode url="~/login.aspx" title="Login" description="Voice Your Opinions - Login"/>
      <siteMapNode url="http://voiceyouropinions.net/petitions" title="Petitions"  description="Voice Your Opinions - Petitions" />
          <siteMapNode url="~/post.aspx?id=677ac686-4a0d-45b5-bb2b-9b47ccbc8bd9" title="President Obama to raise electricity rates" description="TELL LAWMAKERS YOU WANT FAIR ENERGY RATES"/>
          <siteMapNode url="~/post.aspx?id=a304bbc0-5e0c-493a-9e33-a6d13fca9d70" title="Families are losing their homes" description="Families are losing their homes at record breaking rates."/>
          <siteMapNode url="~/post.aspx?id=65ac343f-b43b-49e8-9cc2-da6c94aeb09a" title="Crowdfunding will be dead" description="CROWDFUNDING FACES NEW INCREDIBLY HIGH TAX RATES"/>
          <siteMapNode url="~/post.aspx?id=4bc8a0d5-0fe0-43ce-bd62-083192e97ea8" title="3rd Term for President Obama" description="3rd Term for President Obama"/>
          <siteMapNode url="~/post.aspx?id=9db97e2e-e887-4daf-8fbb-4104338642ee" title="Packaging Issue" description="Sign this petition today to FORCE Kraft to TELL THE TRUTH, and change their packaging. "/>
      </siteMapNode>
      <siteMapNode url="http://voiceyouropinions.net/debates" title="Debates"  description="Voice Your Opinions - Debates" />
          <siteMapNode url="~/post.aspx?id=1e8b14df-434e-413d-bb25-8416074a8fa3" title="Banking"  description="IS BIG BANKING KILLING THE WORLD ECONOMY?" />
          <siteMapNode url="~/post.aspx?id=b2ba12f8-7634-4474-8c47-fbbce9892993" title="Travellers new tax"  description="SHOULD OUT-OF-COUNTRY TRAVELERS FACE NEW TAXES?" />
          <siteMapNode url="~/post.aspx?id=3cab75f6-e0a1-47de-a1be-c347b11519dc" title="Outsourcing"  description="IS SHIPPING JOBS OVERSEAS IS AMERICA'S BEST INTERESTS?" />
          <siteMapNode url="~/post.aspx?id=6ab66568-8d73-4ca2-8eba-2cea3a932d8c" title="Health Insurance"  description="FORCING AMERICAN'S TO HAVE HEALTH INSURANCE, GOOD IDEA?" />
          <siteMapNode url="~/post.aspx?id=f50f4434-1162-48a1-9d3b-2f0836367f69" title="Gatorade"  description="What do plants REALLY crave? Water or Gatorade?" />
          <siteMapNode url="~/post.aspx?id=d488df70-002f-4d64-b574-dbc37d4cd2f5" title="leaked emails between Anonymous and Harambe"  description="Did ANONYMOUS have advanced knowledge of Harambe's fate?" />
          <siteMapNode url="~/post.aspx?id=ebed891b-1258-4a7a-abc1-aff6c804313a" title="Voting through social media using a #"  description="Should the United States adopt the controversial Vote By Hashtag legislation?" />
          <siteMapNode url="~/post.aspx?id=ba3c7580-661e-428e-93e4-0ba83e93d800" title="Merry Christmas or Happy Holidays?"  description="Merry Christmas or Happy Holidays? The debate ends TODAY!" />
          <siteMapNode url="~/post.aspx?id=5e4cdafa-aa9d-4cf6-bd05-1cda370bee2a" title=" Obama vs. Trump"  description="The Battle to End ALL Battles! Obama vs. Trump. Sign up and Sound off!" />
          <siteMapNode url="~/post.aspx?id=f939de52-f6d9-4e97-8f54-19b5aa85d9cb" title=" Republicans vs Democrats"  description="Republicans vs Democrats, Liberals vs Conservatives, Dogs vs Cats" />
       </siteMapNode>
      <siteMapNode url="http://voiceyouropinions.net/causes" title="Causes" description="Voice Your Opinions - Causes"/>
          <siteMapNode url="~/post.aspx?id=af6a328f-0980-41b8-85f9-91ad37ffd405" title="Animal Cruelty Bill"  description="Show your support for this Animal Cruelty Bill!" />
          <siteMapNode url="~/post.aspx?id=efa35eba-daf1-4657-ac6d-4694e54edcb1" title="MOTHERS DWINDLING"  description="FEDERAL AID FOR EXPECTING MOTHERS DWINDLING" />
      </siteMapNode>
    </siteMapNode>
</siteMapNode>
</siteMap>


What I have tried:

Hi, I'm new to creating site map. Currently my requirement is to include title and description to the all pages and it's flow. While trying so I'm getting 3 same errors: Expecting end tag /siteMap . When I add that part further i get 'didn't expect /siteMapNode'. And also I was not getting intellisense while typing, i knew somewhere it is missing or have to add something. Please help me to resolve this.
For reference the live website is : http://voiceyouropinions.net/
Posted
Updated 28-Jan-17 5:08am
v3

1 solution

Quote:
i knew somewhere it is missing or have to add something
Quite the opposite - you need to remove a few things!

You have a terminator / on
XML
<siteMapNode url="http://voiceyouropinions.net/debates" title="Debates"  description="Voice Your Opinions - Debates" />
Remove it.

Same problem with
XML
<siteMapNode url="http://voiceyouropinions.net/causes" title="Causes"  description="Voice Your Opinions - Causes" />
Finally you have two extra tag closing statements at the end that are not needed
XML
  </siteMapNode>
</siteMapNode>

If you tidy up your indentation these things can become quite easy to spot

My final version ended up as
XML
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
	<siteMapNode url="http://voiceyouropinions.net/" title="Voice Your Opinions"  description="Voice Your Opinions">
		<siteMapNode url="~/login.aspx" title="Login" description="Voice Your Opinions - Login"/>
		<siteMapNode url="http://voiceyouropinions.net/petitions" title="Petitions"  description="Voice Your Opinions - Petitions" />
        <siteMapNode url="~/post.aspx?id=677ac686-4a0d-45b5-bb2b-9b47ccbc8bd9" title="President Obama to raise electricity rates" description="TELL LAWMAKERS YOU WANT FAIR ENERGY RATES"/>
        <siteMapNode url="~/post.aspx?id=a304bbc0-5e0c-493a-9e33-a6d13fca9d70" title="Families are losing their homes" description="Families are losing their homes at record breaking rates."/>
        <siteMapNode url="~/post.aspx?id=65ac343f-b43b-49e8-9cc2-da6c94aeb09a" title="Crowdfunding will be dead" description="CROWDFUNDING FACES NEW INCREDIBLY HIGH TAX RATES"/>
        <siteMapNode url="~/post.aspx?id=4bc8a0d5-0fe0-43ce-bd62-083192e97ea8" title="3rd Term for President Obama" description="3rd Term for President Obama"/>
        <siteMapNode url="~/post.aspx?id=9db97e2e-e887-4daf-8fbb-4104338642ee" title="Packaging Issue" description="Sign this petition today to FORCE Kraft to TELL THE TRUTH, and change their packaging. "/>
	</siteMapNode>
	<siteMapNode url="http://voiceyouropinions.net/debates" title="Debates"  description="Voice Your Opinions - Debates">
          <siteMapNode url="~/post.aspx?id=1e8b14df-434e-413d-bb25-8416074a8fa3" title="Banking"  description="IS BIG BANKING KILLING THE WORLD ECONOMY?" />
          <siteMapNode url="~/post.aspx?id=b2ba12f8-7634-4474-8c47-fbbce9892993" title="Travellers new tax"  description="SHOULD OUT-OF-COUNTRY TRAVELERS FACE NEW TAXES?" />
          <siteMapNode url="~/post.aspx?id=3cab75f6-e0a1-47de-a1be-c347b11519dc" title="Outsourcing"  description="IS SHIPPING JOBS OVERSEAS IS AMERICA'S BEST INTERESTS?" />
          <siteMapNode url="~/post.aspx?id=6ab66568-8d73-4ca2-8eba-2cea3a932d8c" title="Health Insurance"  description="FORCING AMERICAN'S TO HAVE HEALTH INSURANCE, GOOD IDEA?" />
          <siteMapNode url="~/post.aspx?id=f50f4434-1162-48a1-9d3b-2f0836367f69" title="Gatorade"  description="What do plants REALLY crave? Water or Gatorade?" />
          <siteMapNode url="~/post.aspx?id=d488df70-002f-4d64-b574-dbc37d4cd2f5" title="leaked emails between Anonymous and Harambe"  description="Did ANONYMOUS have advanced knowledge of Harambe's fate?" />
          <siteMapNode url="~/post.aspx?id=ebed891b-1258-4a7a-abc1-aff6c804313a" title="Voting through social media using a #"  description="Should the United States adopt the controversial Vote By Hashtag legislation?" />
          <siteMapNode url="~/post.aspx?id=ba3c7580-661e-428e-93e4-0ba83e93d800" title="Merry Christmas or Happy Holidays?"  description="Merry Christmas or Happy Holidays? The debate ends TODAY!" />
          <siteMapNode url="~/post.aspx?id=5e4cdafa-aa9d-4cf6-bd05-1cda370bee2a" title=" Obama vs. Trump"  description="The Battle to End ALL Battles! Obama vs. Trump. Sign up and Sound off!" />
          <siteMapNode url="~/post.aspx?id=f939de52-f6d9-4e97-8f54-19b5aa85d9cb" title=" Republicans vs Democrats"  description="Republicans vs Democrats, Liberals vs Conservatives, Dogs vs Cats" />
	</siteMapNode>
	<siteMapNode url="http://voiceyouropinions.net/causes" title="Causes" description="Voice Your Opinions - Causes">
		<siteMapNode url="~/post.aspx?id=af6a328f-0980-41b8-85f9-91ad37ffd405" title="Animal Cruelty Bill"  description="Show your support for this Animal Cruelty Bill!" />
		<siteMapNode url="~/post.aspx?id=efa35eba-daf1-4657-ac6d-4694e54edcb1" title="MOTHERS DWINDLING"  description="FEDERAL AID FOR EXPECTING MOTHERS DWINDLING" />
	</siteMapNode>
</siteMap>

This ends up being displayed in a browser like this:
XML
<xml version="1.0" encoding="UTF-8"?>
-<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
+<siteMapNode title="Voice Your Opinions" description="Voice Your Opinions" url="http://voiceyouropinions.net/">
+<siteMapNode title="Debates" description="Voice Your Opinions - Debates" url="http://voiceyouropinions.net/debates">
+<siteMapNode title="Causes" description="Voice Your Opinions - Causes" url="http://voiceyouropinions.net/causes">
</siteMap>
   
Comments
Amith 12807185 29-Jan-17 23:55pm
   
Hi CHill60, thanks for the answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900