Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Problem in storing URL in XML file

Problem in storing URL in XML file

Scheduled Pinned Locked Moved XML / XSL
helpquestioncsharpcomxml
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Affan Toor
    wrote on last edited by
    #1

    Hi! i am storing the user defined URL in XML file by using C#. I am storing that URL inside the tag as InnerText. if i store the URL "http://www.google.com" it works perfectly, but when i try to store the URL "http://www.google.com/search?hl=en&q=abc" it corrupts the XML file and gives error "A semi colon character was expected." can anybody tell me what is the reason behind this error...? Thanks, Regards, Affan Ahmad Toor

    F R 2 Replies Last reply
    0
    • A Affan Toor

      Hi! i am storing the user defined URL in XML file by using C#. I am storing that URL inside the tag as InnerText. if i store the URL "http://www.google.com" it works perfectly, but when i try to store the URL "http://www.google.com/search?hl=en&q=abc" it corrupts the XML file and gives error "A semi colon character was expected." can anybody tell me what is the reason behind this error...? Thanks, Regards, Affan Ahmad Toor

      F Offline
      F Offline
      Fatbuddha 1
      wrote on last edited by
      #2

      Hi I am quiet sure that the & is the error because it is a special sign in XML. If it also doesn´t work than i might suggest the ?. Thats the two possabilities. Hope i helped.

      A 1 Reply Last reply
      0
      • F Fatbuddha 1

        Hi I am quiet sure that the & is the error because it is a special sign in XML. If it also doesn´t work than i might suggest the ?. Thats the two possabilities. Hope i helped.

        A Offline
        A Offline
        Affan Toor
        wrote on last edited by
        #3

        Thanks for reply, i checked the & sign as you suggested. You was rite, the error was because of the & sign. Looking forward for more help from you in future... Thanks again... Regards, Affan Ahmad Toor

        F 2 Replies Last reply
        0
        • A Affan Toor

          Thanks for reply, i checked the & sign as you suggested. You was rite, the error was because of the & sign. Looking forward for more help from you in future... Thanks again... Regards, Affan Ahmad Toor

          F Offline
          F Offline
          Fatbuddha 1
          wrote on last edited by
          #4

          No prob. thx See you

          1 Reply Last reply
          0
          • A Affan Toor

            Thanks for reply, i checked the & sign as you suggested. You was rite, the error was because of the & sign. Looking forward for more help from you in future... Thanks again... Regards, Affan Ahmad Toor

            F Offline
            F Offline
            Fatbuddha 1
            wrote on last edited by
            #5

            You can overcome this prob by writing & I think. Just if you don´t have a solution. :)

            G 1 Reply Last reply
            0
            • F Fatbuddha 1

              You can overcome this prob by writing & I think. Just if you don´t have a solution. :)

              G Offline
              G Offline
              George L Jackson
              wrote on last edited by
              #6

              You mean by writing: &

              "We make a living by what we get, we make a life by what we give." --Winston Churchill

              F 1 Reply Last reply
              0
              • G George L Jackson

                You mean by writing: &

                "We make a living by what we get, we make a life by what we give." --Winston Churchill

                F Offline
                F Offline
                Fatbuddha 1
                wrote on last edited by
                #7

                sure :) sorry

                1 Reply Last reply
                0
                • A Affan Toor

                  Hi! i am storing the user defined URL in XML file by using C#. I am storing that URL inside the tag as InnerText. if i store the URL "http://www.google.com" it works perfectly, but when i try to store the URL "http://www.google.com/search?hl=en&q=abc" it corrupts the XML file and gives error "A semi colon character was expected." can anybody tell me what is the reason behind this error...? Thanks, Regards, Affan Ahmad Toor

                  R Offline
                  R Offline
                  RupeshSidpara
                  wrote on last edited by
                  #8

                  replace & sign with amp; rupesh

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups