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. C#
  4. Accesing a xml

Accesing a xml

Scheduled Pinned Locked Moved C#
questionxmlhelp
7 Posts 3 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.
  • B Offline
    B Offline
    BECK7
    wrote on last edited by
    #1

    Hi, I need help with this. I added a xml file into my project. Now, in one class i need to acces it so i can process the data in it. How can i do this? how can i get the path of it so i can access it? Thank u so much, i would help me a lot...

    S 1 Reply Last reply
    0
    • B BECK7

      Hi, I need help with this. I added a xml file into my project. Now, in one class i need to acces it so i can process the data in it. How can i do this? how can i get the path of it so i can access it? Thank u so much, i would help me a lot...

      S Offline
      S Offline
      Stanciu Vlad
      wrote on last edited by
      #2

      In order to acces a file that is in the same path with the executable you can try the Application.StartupPath property. I hope you understand...because is a rough world out there...

      B 1 Reply Last reply
      0
      • S Stanciu Vlad

        In order to acces a file that is in the same path with the executable you can try the Application.StartupPath property. I hope you understand...because is a rough world out there...

        B Offline
        B Offline
        BECK7
        wrote on last edited by
        #3

        is it a property of the project? or where can i find this property?

        S 1 Reply Last reply
        0
        • B BECK7

          is it a property of the project? or where can i find this property?

          S Offline
          S Offline
          Stanciu Vlad
          wrote on last edited by
          #4

          Put this into your code. string pathToMyExe = System.Windows.Forms.Application.StartupPath; I hope you understand...because is a rough world out there...

          B 1 Reply Last reply
          0
          • S Stanciu Vlad

            Put this into your code. string pathToMyExe = System.Windows.Forms.Application.StartupPath; I hope you understand...because is a rough world out there...

            B Offline
            B Offline
            BECK7
            wrote on last edited by
            #5

            im sorry, its a asp.net project

            M 1 Reply Last reply
            0
            • B BECK7

              im sorry, its a asp.net project

              M Offline
              M Offline
              Mohamad Al Husseiny
              wrote on last edited by
              #6

              use Server.MapPath to get physical path Server.MapPath("Direcory1\filename.xml"); MCAD -- modified at 17:40 Thursday 1st September, 2005

              B 1 Reply Last reply
              0
              • M Mohamad Al Husseiny

                use Server.MapPath to get physical path Server.MapPath("Direcory1\filename.xml"); MCAD -- modified at 17:40 Thursday 1st September, 2005

                B Offline
                B Offline
                BECK7
                wrote on last edited by
                #7

                do i need to import something? using....?

                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