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. Database & SysAdmin
  3. Database
  4. Creating database from xml

Creating database from xml

Scheduled Pinned Locked Moved Database
databasexmlquestion
4 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.
  • W Offline
    W Offline
    w3Nima
    wrote on last edited by
    #1

    Is any way to build a table base on xml/xsd. Is any way to build xsd from xml. also xsd has some limitation like lentgh of string field. Any idea ? So Thanks

    T 1 Reply Last reply
    0
    • W w3Nima

      Is any way to build a table base on xml/xsd. Is any way to build xsd from xml. also xsd has some limitation like lentgh of string field. Any idea ? So Thanks

      T Offline
      T Offline
      TheEagle
      wrote on last edited by
      #2

      After opening a new xml file write: Then from XML menu select CreateSchema to create xsd file, To determine the Key field right click the element in the xml schema,Add,NewKey. In code-behind page: void GetUserData(string userID) { DataSet ds=new DataSet(); string strpath=Server.MapPath(Request.ApplicationPath); ds.ReadXmlSchema(strpath+"\\xmlfilename.xsd"); ds.ReadXml(strpath+"\\xmlfilename.xml"); DataRow dr=ds.Tables["User"].Rows.Find(userID); string username=dr["UserName"].ToString(); } void SetUserData(string userID) { string strpath=Server.MapPath(Request.ApplicationPath); DataSet ds=new DataSet(); ds.ReadXml("xmlfilename.xml"); DataRow dr=ds.Tables["User"].Rows.Find(userID); dr["UserName"]="user1name"; ds.WriteXml(strpath+"\\xmlfilename.xml") } I am too late but i will never give up

      W 1 Reply Last reply
      0
      • T TheEagle

        After opening a new xml file write: Then from XML menu select CreateSchema to create xsd file, To determine the Key field right click the element in the xml schema,Add,NewKey. In code-behind page: void GetUserData(string userID) { DataSet ds=new DataSet(); string strpath=Server.MapPath(Request.ApplicationPath); ds.ReadXmlSchema(strpath+"\\xmlfilename.xsd"); ds.ReadXml(strpath+"\\xmlfilename.xml"); DataRow dr=ds.Tables["User"].Rows.Find(userID); string username=dr["UserName"].ToString(); } void SetUserData(string userID) { string strpath=Server.MapPath(Request.ApplicationPath); DataSet ds=new DataSet(); ds.ReadXml("xmlfilename.xml"); DataRow dr=ds.Tables["User"].Rows.Find(userID); dr["UserName"]="user1name"; ds.WriteXml(strpath+"\\xmlfilename.xml") } I am too late but i will never give up

        W Offline
        W Offline
        w3Nima
        wrote on last edited by
        #3

        So Thanks I have three question. can I build select,insert,update and create table query from xml. how can I Create Schema without visual studio and what about relational database. thanks

        T 1 Reply Last reply
        0
        • W w3Nima

          So Thanks I have three question. can I build select,insert,update and create table query from xml. how can I Create Schema without visual studio and what about relational database. thanks

          T Offline
          T Offline
          TheEagle
          wrote on last edited by
          #4

          Sorry .. i didnt try any one from your clever ideas before...I think you should put your question as a new thread. I hope one of the forum professional answer your question.:) I am too late but i will never give up

          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