I'm trying to create a WEB application that allows the user to upload an xml file. This xml file would then be parsed and loaded into a database. Does anyone know of code samples to get me started Thanks in advance.
System.Xml.XmlDocument or System.Xml.XmlDataDocument will give you a DOM document you can use to parse XML. Do you understand the DOM Do you know XPath
Thanks for the reply. I have the upload portion already built. What I don't know (due to inexperience) is are their controls that handle parsing the XML or do I need to walk through the file and parse the information I'm looking for myself (basic file i/o)
Well, you need to use a file selection control to upload the file. Then, you'd use an XmlDocument to parse the XML, and depending what database, one of the ADO.NET classes to move the data into the database. You may want to apply an XSD first to see if the file is in the format you expect. There are tons of examples on the web for any one of htese steps. www.codeproject.com is also a good site for articles on this sort of stuff.
I suggest doing some research, using the keywords I've provided as a jump start to google, and then asking specific questions on each task as you work through them. Obviously, if I've not made things clear enough for you to do that, you should ask more, but what you've asked is too broad for me to give more than a broad overview in reply.
upload XML file into database table
Nitronic
System.Xml.XmlDocument or System.Xml.XmlDataDocument will give you a DOM document you can use to parse XML. Do you understand the DOM Do you know XPath
Gerardo Rossi
Thanks for the reply. I have the upload portion already built. What I don't know (due to inexperience) is are their controls that handle parsing the XML or do I need to walk through the file and parse the information I'm looking for myself (basic file i/o)
Ken JCI
Well, you need to use a file selection control to upload the file. Then, you'd use an XmlDocument to parse the XML, and depending what database, one of the ADO.NET classes to move the data into the database. You may want to apply an XSD first to see if the file is in the format you expect. There are tons of examples on the web for any one of htese steps. www.codeproject.com is also a good site for articles on this sort of stuff.
I suggest doing some research, using the keywords I've provided as a jump start to google, and then asking specific questions on each task as you work through them. Obviously, if I've not made things clear enough for you to do that, you should ask more, but what you've asked is too broad for me to give more than a broad overview in reply.
mogulati