Click here to Skip to main content
15,898,134 members
Everything / XSD

XSD

XSD

Great Reads

by Dirk Bahle
Tips & Tricks on De/Serializing object graphs with XML
by kingddd
Introducing a new tool to transform trx (mstest results file) into HTML report
by Krishna P Seetharaman
Issues faced and learnings found during the generation of pipe delimited flat file generation
by rvjagadheesh
Brief introduction about YQL (Yahoo Query Language). Also describes how to use the REST API provided by Yahoo! to gather information.

Latest Articles

by Krishna P Seetharaman
Issues faced and learnings found during the generation of pipe delimited flat file generation
by Dirk Bahle
Tips & Tricks on De/Serializing object graphs with XML
by O.Nasri
A good demo to know how you can implement an XSD & XSLT processor using C#
by rvjagadheesh
Brief introduction about YQL (Yahoo Query Language). Also describes how to use the REST API provided by Yahoo! to gather information.

All Articles

Sort by Title

XSD 

19 Nov 2013 by Member 10329703
I want to integrate with MS Dynamics Navision and am looking for some Purchase Order XSD supported by Navision. Can someone provide me some pointers as to where to find them.
31 Jul 2015 by yash00121
I am creating a rdlc report to print barcode where i post the barcode and item information from the database to new created bcodeds.xsd and DataTable1 is a datatable, i am writing the fallowing code but i am getting errorDim newCustomersRow As bcodeds.DataTable1Row newCustomersRow =...
10 Feb 2012 by Charlie Matherne
Currently, I'm adding elements to my XmlDocument using XPath notation for which I've written code to that places the element at the proper location in the file. With one exception. I don't know how to make it pay attention to the sequence rules defined in my XSD file.Is there a way to add an...
10 Feb 2012 by Christian Graus
XMLDocument uses the DOM, so you have methods to insert nodes where-ever you like. http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.prependchild.aspx[^]is probably what you want.
10 Feb 2012 by Espen Harlinn
Have a look at xsd.exe[^]The XML Schema Definition tool generates XML schema or common language runtime classes from XDR, XML, and XSD files, or from classes in a runtime assembly. UpdateHave a look at Extreme XML:XML Serialization in the .NET Framework[^]Best regardsEspen Harlinn
31 Jan 2012 by arielbeck
hello, i've wasted a whole day for this, can't find the solution.i have the following main schema: ...
31 Jan 2012 by Sergey Alexandrovich Kryukov
It looks like you misuse complexType: you cannot specify content of complex type without intermediate XSD node describing the type of complex type content, such as sequence, like in this example: ...
11 Aug 2019 by mgoad99
I have a few XSD files and associated XML files containing data from a vendor. I will be importing the XML data into SQL Server. But first I need to setup the tables in SQL Server to match the structure described in the XSD files. The question I have, is there a tool or way to automate...
5 Dec 2013 by RaisKazi
Have a look at below links.http://technet.microsoft.com/en-us/library/ms171993.aspxhttp://stackoverflow.com/questions/138575/how-can-i-create-database-tables-from-xsd-files
11 Aug 2019 by Member 14055619
Use XSD2DB[^] worked for me like wonder.
23 Jan 2017 by Nabin Jha
I have an XML file .... .... I am creating to validate schema. But I did not know the exact count of attach and every node will be in increment form. SO i want to check the name as Partial string.What I have tried:I am...
20 Nov 2015 by krzbuk
Hi i have a problem with sending message to WebService I'm generating code with wsutil.exe, in wsdl and xsd files i have field marked as xsd:date (only date), wsutil.exe generate's this properties as WS_DATETIME.I can't send message to WebService becouse i have error about invalid date...
13 Jun 2012 by ♥…ЯҠ…♥
Actually i was assigned with a task to identifyWhether the XSD UI file can be converted into C# UI solutionI googled a lot regarding this. But i could not find a dime about this.So it will be more helpful to know if it is applicable to do so or notIf applicable means how?...
13 Jun 2012 by Joshi, Rushikesh
Answer is with you but I don't under stand what was your requirement.That CS file is Object representation of XSD file, so you can create an object using that CS file and if you will serialize that object and will come with XML file then that XML file should be validated against XSD...
9 Dec 2013 by Aswin Waiba
Hi I have a an complex element something like thisand the attributes "value1" and "value2" are optional however either one of the attributes "tag" or "to" need to be present. so can I write a xsd for...
4 Sep 2013 by Sagar Khairnar 55
Hi all,I have an query, can anyone tell me can we create xslt from XSD schema.My requirement is,I have to an XSD Schema of Order.I want to create an new xml file for every order based on the data of OrderObject.I am suppose to creating the order_xml with the help of Xslt by...
4 Sep 2013 by Menon Santosh
yes you can refer following linkshttp://social.msdn.microsoft.com/Forums/vstudio/en-US/2cc286ca-4903-45a3-b0e6-e2ef397ca590/generate-xslt-from-xsd-file-in-c[^]http://stackoverflow.com/questions/8369677/using-xslt-to-transform-multiple-xml-schema-documents[^]
12 Jun 2012 by Henning Dieterichs
Hello!I want to compose a simple type within a xsd schema.Here a xml example:The 'Definition' attribute consists of two parts: a xsd:double ("0.001") and a custom type (UnitAbbreviation, "m", used for the 'Abbr' attribute...
12 Jun 2012 by barneyman
You'll have to build a huge regex ... or solve it in an alternative fashion ..How about having child nodes that define the Unit, that way you can have multiple definitions, the XSD is easier to construct and you get easier lookups?ie.
13 Jun 2012 by Henning Dieterichs
Mapping the n:n unit-hierarchy to the 1:n relationship of parent and children in xml will add more complexity (though it is in the sense of xml), since the format won't be extendable (you can simply add a new element to the bottom of a list, but in an hierarchy you have to specify where to add...
26 Dec 2011 by sharmarun
can any tell me how to make c# class of a .xsd file using C#.net means how i can use xsd.exe in code behind and save generated class .thanxz in advance
27 Dec 2011 by demouser743
Try this toolhttp://www.bware.biz/DotNet/Tools/CodeXS/WebClient/GenerateInput.aspx[^]
27 Dec 2011 by RaviRanjanKr
Try http://xsd2code.codeplex.com/[^]
27 Dec 2011 by Anuja Pawar Indore
Refer these threadshttp://stackoverflow.com/questions/8009672/how-can-i-convert-xsd-file-to-c-sharp-class[^]http://stackoverflow.com/questions/1060017/convert-xsd-files-to-c-sharp-serializable-class[^]
12 Jul 2012 by Selvasusan
I want to create a tool in windows forms C# , which accepts XSD file and a Excel file (Which contains data). The tool has to generate output as XML with the given Xsd Schema applied on the Excel data. Please note that the XSD and Excel file which I receive will Dynamically change each time. I...
12 Jul 2012 by Chasfer
This one can help you. Have a check: Generate Excel from XML and Generate XML from Excel[^]
22 Mar 2013 by Nonestop
I want to convert excel file into xml file applied XML schema(xsd file).Input is XSD and Excel file, and output is schematized xml.(I guess the files format are correct, because those were provided as template by supplier's site.)I found some samples in codeproject, but the result...
9 Aug 2013 by patelv61
I am in process to convert oracle table to xml and I like to know if there is tool available in Powershell to do this.
9 Aug 2013 by Sergey Alexandrovich Kryukov
It looks like the body of the question has nothing to do with its title.The question about conversion of XML to XSD is incorrect, because: 1) XSD file is already an XML file, and "converting" a file to the identical file makes no semantical or practical sense; 2) as to the semantic of those...
16 Apr 2015 by kingddd
Introducing a new tool to transform trx (mstest results file) into HTML report
22 Jun 2013 by Dipesh Tiwari
I am creating a utility to convert the Dataset into xsd file. i am Reading data from database and creating dataset For creation of XSD file i am actually creating a Dataset and Datatable and then i am using Dataset.WriteXMLSchema() to write the xsd file.After my file generated i am getting...
12 Apr 2019 by Roger Tranchez
Hello, (* I'm using LinqPad to test this, that's why you can see the .Dump() call at the end of my sample) In this code, I'm getting "Instance validation error: '' is not a valid value for claves_sexo", because it is empty: void Main() { string xmlString =...
12 Apr 2019 by #realJSOP
I wrote extension methods to return a default value if the element didn't exist. Go to this CP article: Downloads: SQLXAgent - Jobs for SQL Express - Part 1 of 6[^] and scroll down to SqlxCommon\FileExtensions, and look for ExtendLinqToXML.cs BTW, I generally don't us the built-in .Net...
4 Jul 2020 by Member 14880951
Hi Mark, We have the same issue but couldnt able to resolve it. If you were able to resolve this issue, please provide the resolution steps. Thanks in advance!!
25 Sep 2012 by dashingly
Hi,I am new to the world of Office Add-Ins.Here is what I am trying to do:I would like to create an add-in that will:1. Read column names of an open excel document (xls, xml, csv, etc).2. Read the fields of a provided XSD XML schema file.3. Map the fields to columns if they match...
7 Jun 2013 by Member 10097563
Hi,I want to convert an excel sheet to XML using XSD by writing a VB Macro.This feature is available in Office 2010 where you can map a XSD file in an excel sheet and click on export XML to get an XML file but it works for simple and non-repetitive nested tags.I have a complex schema...
7 Jun 2013 by Maciej Los
CP Knowledge base:Convert Excel to XML file/XML Schema, and validate Excel against XML Schema[^]Google with: VBA Excel to xml using xsd msdn sentence returns (few example...
23 Nov 2016 by Member 12866356
Hi Experts I have a .XSD file and registered into the Oracle XMLDB repository. I would like to create a table conforming to the XSD structure and insert records in that and retrieve the output in a XML format.The following is an example of an XML schema definition, po.xsd:
23 Feb 2012 by udayRBA
Hi, I am working on c# application dealing with XML data. I've got the XSD file and I have to generate XML file depending on the XSD. 1 solution I know is, using xsd.exe(by genratign class file), but here requirement is quite different. Here, user can give any XSD at run time and according...
24 Feb 2012 by Martin Arapovic
Hi,Check this tool.http://xsd2code.codeplex.com/[^]Maybe it has feature that can fit your needs...
8 Apr 2013 by Erik06se
I got a issue with XML, and write some information on a XML-file. I got several xsd-files describing my XML. I created one big .cs-file with "xsd/c testfile1.xsd testFile2.xsd..." etc. And everything went nice and looks good. But if I take one created class i.e. testfile1.xsd, it looks like...
9 Apr 2013 by Erik06se
Nevermind, I think I knov the issue. It's because this xsd.exe creates 'DefaultValueAttribute' for those fields. That prevent this field to be in the xml. Maybe some xsd-switch could have done that, I dunno...
8 Apr 2013 by Erik06se
Hi. I got a generated class in C# (from a xsd with xsd/c), that got this declaration (together with string-fields, numeric fields and so):private string[] itemsField;private ItemsChoiceType[] itemsElementNameField;The ItemsChoiceType looks like this:public enum ItemsChoiceType1 { ...
14 Apr 2013 by Erik06se
I had no choise but follow a xsd, I only got it in my hand from 3.rd part. That's why it looks a bit confusing. But the solution was easier then I thought. I don't know how this work, but id does. I just filled in the arrays with enums, and it looks nice. The other array keep the values.Kind...
11 Aug 2015 by gregorio89
Hi I have to read an xsd for create the xml structure on a dataset.when I do Dim Dati_xml As New DataSet Dati_xml.ReadXmlSchema("xsdpath")I get this error Element 'http://www.w3.org/2000/09/xmldsig#:Signature' is not declared.Can you help me?thank youthis is the header...
9 Aug 2015 by sreeyush sudhakaran
You missed .xsd or.xml extension in the code. It should be likeDim Dati_xml As DataSet = New DataSetDati_xml.ReadXmlSchema("xsdpath.xsd")for more refer here : https://msdn.microsoft.com/en-us/library/atchhx4f(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1[^]
10 Aug 2015 by Maciej Los
You did not provide enough information to help you. So, we can only refer to similar questions and answers which may help you to find a way to resolve your issue:Validating Signature element of XML fails against XSDValidate signed XML with XSD - xmldsig
11 Aug 2015 by User 11060979
Not the solution, but a "pragamtic workaround" to proceed work.I'm far away from be an expert on this, but my inspration told me to remove this "signature things", so I removed the line:And see... the DataSet will be created and I can...
4 Oct 2016 by zonkerman2
I have an asmx web service (yes I know its old tech but no choice in the matter) I need to add a new class to for data transfers. Basically it will be used to pass into methods or return data. The class name is InspectionResults. The class is built using an xsd file as required for the group I...
5 Jan 2015 by Yesudass Moses
Hi Friends,I am new to SSIS packages. I have an SSIS package Solution in my local machine. It has an XML Source component which uses an XSD file in my local machine.When I deploy this on my SQL Server, How can I set the path to a new location on server ?Thanks
5 Jan 2015 by deepakdynamite
Better to add an configuration file in SSIS and store your XSD File path in it... This will allow you to change values after deployment.http://www.sqlshack.com/using-xml-file-configure-ssis-package/[^]
30 Mar 2015 by Member 10769366
There is some straight forward code to convert XSD file to XML file. But I'm unable to convert the vice versa. Need a C# code to convert XML to XSD.
30 Mar 2015 by Ajith The Great
Hi,Check this out..Convert a XML file to a XSD file[^]Hope this helps you..
3 Nov 2014 by roca2012
I am receiving XML from the database and trying to process it into my system. I have generated a class from an XSD that I received from the other team. The problem I'm having is that, right now the property names in the XSD do not match up to the property names within my application (typical)....
25 Dec 2022 by Stiv Ostenberg
I am working on an XML Schema. I want the XML to contain multiple instances of "Manifest Entries" each containing a series of "Entries". In my application I want users to be able to enable or disable certain sets of "Manifest Entries" (they are...
13 Jun 2022 by .Net Perfect Dev
​ Hello, i want to validate by xsd an attribute can contain a float type or a word "exist". after search in the net i found this solution(https://www.w3schools.com/xml/schema_facets.asp)� but it does not worked. how to fix that ? ​ What I have...
13 Jun 2022 by ludosoep
It is a little odd that a double type can hold the value "exist". The example you've sent actually describes pattern matching on a string type. So it is either changing the type to string or define a double value that is considered equal to...
13 Jun 2022 by .Net Perfect Dev
ok this is an exemple : xml file: and this is the xsd file which i tried:
21 Oct 2016 by O.Nasri
A good demo to know how you can implement an XSD & XSLT processor using C#
20 Apr 2020 by Jörgen Andersson
So I have an XML file that I want to bulk load into a database. To create the database it would be nice to extract an XSD from it first. But the file is 80GB, so it won't open in visual studio. It's also a fairly advanced structure and my...
20 Apr 2020 by Maciej Los
Well... As agreed with @phil.o and @CHill60, the best way is to use XML Schema Definition Tool (Xsd.exe) | Microsoft Docs[^] Alternativelly, you can use XmlReader Class (System.Xml) | Microsoft Docs[^] to read xml data in async mode. Good luck!
20 Apr 2020 by RickZeeland
According to this CodeProject article: Create an XSD Schema….without knowing a darn thing about XSD.[^] you can generate XSD from a DataSet as follows: MyDataSet.WriteXmlSchema(@"MySchema.xsd");
8 Oct 2014 by Member 10846480
good morning, i am in a win application in c# language. i have to read a excel file (both xls and xlsx) and i would validate it with an xsd file but i wrong something because i get an error: data at the root level is invalid. Line 1, position 1 if i use the same xsd with corrispondent xml file...
9 Oct 2014 by Maciej Los
Excel (starting from 2007 and higher) uses non-typical XML file. See OpenXML standard[^]. You can't validate Excel files this way.Older version of MS Excel does not support OpenXML standard.
15 Mar 2019 by Member 14183132
This is my xml code. ?xml version="1.0" encoding="UTF-8"? c_101 Monica 25 c1 ...
25 Oct 2014 by madhuabhi
I know we can use generate xml file option in eclipse. But I want the process to be automated
25 Oct 2014 by Richard MacCutchan
Start with http://www.w3schools.com/schema/[^].
25 Oct 2014 by Maciej Los
There is a tool, which is named xsd.exe[^]. This is standard tool for Visual Studio.[EDIT]Tutorial: Generate Sample XML from XSD[^][/EDIT]
28 Apr 2015 by dinesh_redhawk
I have to parse the data from a very big xml file with lot of repeatetive elements and child nodes. I could have used the GetElementsbyTagName but that will be a very lengthy and complex solution w.r.t this xml file.I think the best method would be xml serialization and deserialization...
28 Apr 2015 by Leo Chapiro
Basically take a look at this answer:Use XML reader instead of XML dom. XML dom stores the whole file in memory which is totally useless: XmlReader ClassYour second question:Quote:How to use/access "private ATXARPACKAGE[] aRPACKAGESField" Why have you made this variable...
28 Apr 2015 by Mehdi Gholam
Start here : http://stackoverflow.com/questions/15772031/how-to-parse-very-huge-xml-files-in-c[^]https://msdn.microsoft.com/en-us/library/bb387013.aspx[^]
30 Dec 2017 by Member 10189763
Hello Everyone. I am a little bit new to soap request and response. I am working on a project assigned to me where our partner has provided us there wsdl. In a request, they have mentioned an attribute which accepts multiple values. For the values to be passed they have provided us '*.xsd' file....
30 Dec 2017 by F-ES Sitecore
Just have multiple instances of the element ? Message 1 Message 2 If you have their WSDL file you should be able...
31 Aug 2014 by bahman01
When I want to compile, an error shown:#error: The expression you have entered is not valid.Plus in Visual Studio 2010 this message is shown:'if' conditional must have boolean type.and my code for expression is:Message_2.Article.Approved = false;and this is my XML code in scheme...
13 Oct 2014 by Nilesh_AES
It seems like you have made mistake while promoting your field.In such cases you should use show promotion.
11 Nov 2013 by Member 10329703
I have following xsd -
11 Nov 2013 by Sergey Alexandrovich Kryukov
By W3 standard, the value of the attribute targeted by the attribute declaration of the schema, should be defined as default or fixed, whichever is appropriate, not as "value". Please see:http://www.w3.org/TR/xmlschema11-1/#cAttribute_Declarations[^].—SA
17 Jul 2014 by Bhagyashree Chaudhari - Member 10473634
Hello ,I want to usehttps://www2.agenciatributaria.gob.es/ADUA/internet/es/aeat/dit/adu/adrx/ws/IE615V2.wsdl[^]in my C# project , i have added its reference in my project , but now i dont know how to call IE615V2() and get response from that.For testing , i have tried to import it...
25 Sep 2012 by zsh64
Hi ExpertsI convert WebApp to website I use XMLSchema.xsd in Web ApplicationCan I use XMLSchema.xsd in Asp.net Website ?(vs 2010)How to use it?
25 Sep 2012 by Kuthuparakkal
Yes very much, use System.Xml namespace:http://msdn.microsoft.com/en-us/library/y3y47afh.aspx[^]
23 Mar 2015 by Umesh AP
I have complex type (EmployeeInfo) defined in an .xsd file. So how can i use that type in my C# Web Service class? I already done lot of search on Google but can't find proper information. Thanks in advance.
26 Mar 2015 by johannesnestler
So you can use the xsd Tool manually to generate the classes.See https://msdn.microsoft.com/en-us/library/x6c1kb0s(v=VS.100).aspx[^]for documentation.You find the tool in the .NET SDK Folder. E.g C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
28 Oct 2020 by Member 14977865
I am receiving the SOAP Request XML which need to be validated against the WSDL. Also, SOAP Response XML should be validated against the WSDL using the .Net core 3.1 version. What I have tried: I have tried use XDocument document =...
29 Dec 2015 by Ravindranath.net
Hello,I would like to validate my input object using the xsd file I defined. Would you please let me know how to do this?below is my c# objectusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace...
29 Dec 2015 by Mathi Mani
Hi Ravindranath.net,You can validate a XML against a XSD using the Validate extension method.Here is the code showing how to do it. XmlSchemaSet schemaSet = new XmlSchemaSet(); DirectoryInfo dir = new DirectoryInfo(""); foreach...
21 Feb 2016 by prat10j
I have created a class library in which all the schema are added. The xsd schema have relative schemas (import/include).The dll of this project is referenced in another application where I need to validate the input XML, using these referenced dll schema.Please help me, how can I...
20 Apr 2015 by Lalyka
I want to send a http request from client to local server and on the server I made a query with Linq that returns data in xml I also have .xsd file and a .cs file enerated from my xsd file that I want to validate my xml with. I have several questions:how can I validate xml with c# generated...
20 Apr 2015 by Maciej Los
Wikkipedia wrote:XML validation is the process of checking a document written in XML (eXtensible Markup Language) to confirm that it is both well-formed and also "valid" in that it follows a defined structure. A well-formed document follows the basic syntactic rules of XML, which are the same...
16 Jul 2015 by Member 11704693
This is the xml syntaxfor...
16 Jul 2015 by phil.o
Learn XSD, and type your schema definition by hand in a text editor (I've done that once, a long time ago).Or get an XML/XSD editor that could allow you do that graphically. I use XMLPad but if think there exist other open-source XML tools.
11 Mar 2015 by Member 11149146
100 2010 ABC PQRin the above xml if I delete 2010 this line then it must say...
11 Mar 2015 by Sergey Alexandrovich Kryukov
In XSD, you can make some element optional or mandatory. This can be controlled by explicitly defining the multiplicity, which can be understood as a constraint over the number of occurrences, using the attributes minOccurs and maxOccurs. Here the usage is explained on a simple sample:...
12 Mar 2015 by Maciej Los
I found 2 links:http://stackoverflow.com/questions/8925706/xml-schema-how-to-restrict-attribute-by-enumeration[^] - this one you have probably seen before, because you used similar...
17 Mar 2015 by Member 11149146
[I don't think there's any way of doing this in XSD 1.0. In XSD 1.1, like most things, it can be done with assertions.]
21 Mar 2013 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
24 Mar 2013 by Deepu413
I have to define a pattern for a string in the following formatIts a concatenated string having 4 strings separated by "=". It should look something like "string1=string2=string3=string4"Here the length of strings is not fixed so I cannot define a patternstring1 can have 0 to 25...
19 Nov 2013 by Member 10329703
I want to integrate with Sage ERP3X and am looking for some Purchase Order XSD supported by Sage ERP3X. Can someone provide me some pointers as to where to find them.
8 Apr 2014 by Sergey Alexandrovich Kryukov
Not clear what your concern is. You validate whole instance of XML against one schema...Please see: http://stackoverflow.com/questions/4134553/c-sharp-validate-xml-against-xsd[^].—SA
20 May 2016 by bharati_c
Is it possible to use a xsd schema against an xml file that validates the xml file in the following ways:1. if Attibute1 value is "XYZ" then Attibute2 value should be "ABC"?if Attibute1 value is "WXYZ" then Attibute2 value should be "DEF"?current xsd sample: