About 965,000 results
Open links in new tab
  1. c# - Read typed objects from XML using known XSD - Stack Overflow

    Feb 20, 2010 · using (var fs = File.OpenRead(FilePath + "SimpleFields.xsd")) xs = XmlSchema.Read(fs, null); xd.Schemas.Add(xs); xd.Load((FilePath + "SimpleFields.xml")); xd.Validate(null); var el_root = xd.DocumentElement; var el_date = (XmlElement)el_root.SelectSingleNode("./DateVal"); //WANTED: el_date.Value = 2010-02-18 01:02:03 (as a DateTime Object)

  2. From EXCEL to XSD generated class in C# - Stack Overflow

    Jun 21, 2017 · I am able to read the excel file in Visual Studio and convert to XML, however this does not conform with the XSD generated class. I know that I have to create an instance of the "Test_XSD" and load it with the data from the Excel but I don't have any clue from where to start.

  3. c# - How to parse a XSD file - Stack Overflow

    Jul 16, 2010 · In C#, XPath/XQuery are used via XmlDocument . In particular, through calls like SelectSingleNode and SelectNodes. I recommend XmlDocument over XmlTextReader if your goal is to pull out specific chunks of data. If you prefer to …

  4. How to Convert XSD to XML Using C# - Web Dev Tutor

    Jul 22, 2024 · When working with XML data in C#, you may come across situations where you need to convert an XSD (XML Schema Definition) file to an XML file. This process can be essential for validating XML data against a predefined schema or for generating sample XML data based on a schema.

  5. Reading and Writing XML Schemas - .NET | Microsoft Learn

    Sep 15, 2021 · The following code example illustrates reading and writing XML schemas from and to a file. The code example takes the example.xsd file, reads it into an XmlSchema object using the static Read method, and then writes the file to the console and a new new.xsd file.

  6. XML Schema Definition Tool (Xsd.exe) - .NET | Microsoft Learn

    Jul 29, 2022 · To read XML data into the object, use the XmlSerializer.Deserialize method. Generates a class derived from DataSet that corresponds to the specified schema. To read XML data into the derived class, use the DataSet.ReadXml method. You can also specify any of the following options for .xsd files.

  7. Converting XSD to XML in C# - Web Dev Tutor

    Aug 22, 2024 · To convert XSD to XML in C#, you can leverage the XmlSchema and XmlTextWriter classes provided by the .NET Framework. Here's a basic example demonstrating how you can perform this conversion: using System.Xml; using System.Xml.Schema; class XsdToXmlConverter . public void ConvertXsdToXml(string xsdFilePath, string xmlFilePath) .

  8. Excel to XML Conversion in Visual Studio - C# Corner

    We often need to convert an Excel document to a tag-based format like XML. Here I will write a program in C# to convert an Excel file to XML. First of all we see our requirement of what type of XML file we want, in other words which column comes first and so on.

  9. How to: Use the XML Schema Definition Tool to Generate Classes and XML ...

    Oct 8, 2024 · The XML Schema Definition tool (Xsd.exe) allows you to generate an XML schema that describes a class or to generate the class defined by an XML schema. The following procedures show how to perform these operations.

  10. Excel To XML Using LINQ - C# Corner

    In this article we will show you the easiest way to convert Excel data into Xml files. First getting Data from the Excel file and by using OLEDB in Data Table then Exporting this data table into XML, here you will learn the XML Conecepts like writing the xml document using XmlTextWriter.

Refresh