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. XML,XSD and Dataset's with c#

XML,XSD and Dataset's with c#

Scheduled Pinned Locked Moved C#
csharpdatabasehelpasp-netsql-server
2 Posts 2 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.
  • R Offline
    R Offline
    Rhys__666
    wrote on last edited by
    #1

    I'm building an asp.net app with c# to load data from different file resources, validate it and push it into a SQL Server db. I've handled Word interop so I can pull in data from pre-defined Word documents, validate and load it. I've worked with CSV's and have no problem there. The issue I'm having is XML, or rather XSD. I have an XSD which I want to use to validate data imported from XML. I've tried the XSD.exe tool but it just doesn't seem to generate an accurate typed dataset, basically not all datatables I'd expect defined, are defined. Can I use an XSD file at runtime to validate XML imported using ReadXML, and if not, how else can I do this? Any thoughts appreciated, all avenues explored... Rhys "When one burns one's bridges, what a very nice fire it makes" -- Dylan Thomas "As to marriage or celibacy, let a man take the course he will. He will be sure to repent" -- Socrates "Doh!" -- Homer Simpson

    P 1 Reply Last reply
    0
    • R Rhys__666

      I'm building an asp.net app with c# to load data from different file resources, validate it and push it into a SQL Server db. I've handled Word interop so I can pull in data from pre-defined Word documents, validate and load it. I've worked with CSV's and have no problem there. The issue I'm having is XML, or rather XSD. I have an XSD which I want to use to validate data imported from XML. I've tried the XSD.exe tool but it just doesn't seem to generate an accurate typed dataset, basically not all datatables I'd expect defined, are defined. Can I use an XSD file at runtime to validate XML imported using ReadXML, and if not, how else can I do this? Any thoughts appreciated, all avenues explored... Rhys "When one burns one's bridges, what a very nice fire it makes" -- Dylan Thomas "As to marriage or celibacy, let a man take the course he will. He will be sure to repent" -- Socrates "Doh!" -- Homer Simpson

      P Offline
      P Offline
      partyganger
      wrote on last edited by
      #2

      try using the XMLValidatingReader

      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