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. how to find the error in xml file in C#.

how to find the error in xml file in C#.

Scheduled Pinned Locked Moved C#
csharpxmlhelptutorial
4 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.
  • G Offline
    G Offline
    gpremkamal
    wrote on last edited by
    #1

    hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.

    B S J 3 Replies Last reply
    0
    • G gpremkamal

      hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.

      B Offline
      B Offline
      blackjack2150
      wrote on last edited by
      #2

      Load your xml file in an XmlDocument object inside a try-catch block before at he beginning. If you catch an exception close your app or show a message to the user or do whatever you need.

      1 Reply Last reply
      0
      • G gpremkamal

        hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.

        S Offline
        S Offline
        Stevo Z
        wrote on last edited by
        #3

        There is a utility called Notepad++ a and XML plugin available at same site. Try that, if you are working with larger amout of data, it will save you a lot of time and nervers :)))

        1 Reply Last reply
        0
        • G gpremkamal

          hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.

          J Offline
          J Offline
          Jaiprakash M Bankolli
          wrote on last edited by
          #4

          I would suggest you to create an XSD (schema definition), This will validate the XML for correctness. After loading XML, Use the validateSchema method and pass required XSD and check for the correctness. Hope this helps

          Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com http://jaiprakash.blog.com/

          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