Click here to Skip to main content
15,899,025 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 Updated

XSD 

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...
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 .Net Perfect Dev
ok this is an exemple : xml file: and this is the xsd file which i tried:
26 May 2016 by AIR TRAVELS
i have posted xml using c sharp the code given below but what if i have to post xsd schema like that http://webservices.travelpack.com/xsd/external/FlightChoice.xsd[^] here is its content that i want to post SO KINDLY TELL ME HOW TO POST XSD SCHEMA IS IT SIMILAR LIKE XML...
30 Mar 2015 by Ajith The Great
Hi,Check this out..Convert a XML file to a XSD file[^]Hope this helps you..
30 Mar 2014 by amiach
Hi I try to use my xsd file to generate xml file and .NET Object ClassI execute the command on Developer Command Prompt for VS2012.C:\Program Files (x86)\Microsoft Visual Studio 11.0>xsd.exe /c http://schemas.monster.com/Current/XSD/Job.xsd But I have an error that I can't solve...
12 Jul 2013 by amin uddin cs
Hi, I have an xml file like
7 Aug 2012 by ammu23
HiI need to develop a validator for a large xml agains xsd.I've developed it..But now requirement changed. Now i need partial xml validator..which means it should return true though xml validated partially..For example...
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[^]
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: ...
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...
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...
2 Nov 2011 by Bangla Gopal Surya Prakash
Validating XML against defined XSD
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.
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...
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:
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...
12 Jul 2012 by Chasfer
This one can help you. Have a check: Generate Excel from XML and Generate XML from Excel[^]
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.
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...
31 Jan 2012 by deepak chaudhari snk
In my application i am generating xsd from xml file.But i got error during Deserialize that xsd and displaying error message like "There is an error in XML document (2, 2)." If you have any solution on this problem then please let us know.Sample xsd:
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/[^]
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...
26 Dec 2011 by demouser743
Hi all i have my xsd defined as follows Check 12 ...
27 Dec 2011 by demouser743
Try this toolhttp://www.bware.biz/DotNet/Tools/CodeXS/WebClient/GenerateInput.aspx[^]
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...
11 May 2015 by dinesh_redhawk
Hello friends,Facing some problem with XML deserialisation. Please help:1) I have a XSD file, which i convert into a CS file using XSD tool. Tried to use this CS file in my project to deserialize a XML file (generated from the same XSD file). By doing this, iam getting error like "Cannot...
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...
22 Dec 2017 by Dirk Bahle
Tips & Tricks on De/Serializing object graphs with XML
12 Jan 2018 by Dirk Bahle
I am not sure what you actual problem is because the XML/XSD samples are long enough to oversee tiny problems - but you should: 1> Make sure that your error message contains a line number and column to see better where it locates the problem. An example for that is here using the...
14 Jan 2018 by Dirk Bahle
Hi, I'd love to help you more but I don't think I could do it because of time constrains and I also don't have the data, the database etc... but what you can also do is to load the XML and the XSD in Visual Studio (File Open) and then VS may underline the XML part where it things that it is not...
1 Jan 2020 by dj4400
Hi i Have a xml file with a position tag that describes a latitude longitude and altitude point which looks like this: 25.41 60.84 230 How do i write an XSD element that describes this tag? Thanks! dj4400 What I have tried: I cant change the original xml tag to 3...
14 Jan 2018 by Donguy1976
Hello there, I have a XML file as shown below. 1 1 2017-12-29T12:16:51 ...
17 Jun 2013 by Erhan İMREN
declare @x xml;set @x = '
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...
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 { ...
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...
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...
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
9 Jul 2017 by F-ES Sitecore
I googled "xsd sequence" and this was the first result XML Schema sequence Element[^]
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...
9 Jul 2017 by Frederic GIRARDIN
Hello. I'm a .NET developer, and I'm working on the IFC format, which is the main format for exchanging data between each stakeholder of a construction project. Initially this format is described in EXPRESS language and the information was stored in the STEP21 format. But recently,...
18 Dec 2014 by George Jonsson
I think you have an error in the beginning of the XSD.
26 May 2016 by George Jonsson
An XML schema (XSD) IS an XML file by definition, so you can treat it in the same way as a regular XML file containing data elements.See XML Schema Tutorial[^]You might want to tell the receiver that you are sending a schema instead of content.You can do this with, for example, an...
31 May 2016 by George Jonsson
Instead of nillable="true"tryminOccurs="0"This will leave out the element all together. Test
18 Sep 2017 by Graeme_Grant
A Google Search: merge XSDs[^] found this: java - How to merge more than one XSD file to one XSD file? - Stack Overflow[^] which has examples and points to these documents for further information: * Schema Component Reuse - "include", "redefine" or "import"[^] * Schemas That Use Other...
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...
18 Jun 2013 by H.Brydon
Providing xmlns="anything" in the root info defines the global namespace for the info in the rest of the file. Your xml is somewhat complex. Removing the global namespace spec somehow changes the xml content. Use of an xml editor might be helpful in decoding the problem if you don't see it...
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...
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...
23 May 2012 by hornet_79
hello everyone,i try to define the attribute "id" of the element folder as unique. theoretically i know how to do this. my problem is, that i can achive this only with elements on the same level (is level correct in english?). see the code below.
23 May 2012 by hornet_79
Thanks again... validates now as it should. The important part is Solution looks like this:
23 Jan 2012 by jija
Platform : Visual Studio 2010, Windows 7, VC++, MSXML. Hello, I'm working on a project that deals with structured data corresponding to different data formats (EDI, flatfiles, xml) using proprietary classes in an unmanaged C++ code.I need to develop a logic that will replace the...
18 Dec 2014 by jkirkerx
Wasn't sure where to post this question, so I'll post it here.I'm reading this API, and creating an XSD file to code against.This API, has all the names prefixed with v1:The API says The First Data Global Gateway Web Service API uses HTTPS and SOAP to communicate withyour...
18 Dec 2014 by jkirkerx
Called tech support and got the other API, which is just straight XML, no v1's and those other pesky attributes. I'm not sure what to think here.
13 Jul 2020 by jlayani
Hi, I’ve been tasked with building a web-based interactive SDK to speed up client-side development for our RESPful Web Service APIs. Part of the solution requires an engine that can read an XSD and dynamically generate an editable html form. The idea is to have the user populate the online...
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
30 May 2012 by Joshi, Rushikesh
Hi All,I have two schema (XSD) files embedded in to DLL.Parent Schema - Mentioned all complex typesMain Schema - My current schema for XML stream.Now when I am loading main Schema from DLL it is giving ComplexType not declared exception.I think I need to change the way I am...
8 Jun 2012 by Joshi, Rushikesh
Hi All,How can I remove QualifiedName in XmlSchemaElement? As QualifiedName is readonly, how can I create a new XmlSchemaElement and copy content except QualifiedName from original XmlSchemaElement;ThanksRushikesh Joshi
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...
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...
16 Apr 2015 by kingddd
Introducing a new tool to transform trx (mstest results file) into HTML report
30 Mar 2014 by Kornfeld Eliyahu Peter
The problem that xsd.exe can't get its input file in URI format. It expects something like C:\...So download that xsd file to local disk then run xsd.exe no it...
14 Oct 2014 by Kornfeld Eliyahu Peter
An element like does not declare a null element, but an empty element (0 length string).To make an exiting element that is nullable you have explicitly state it... An other option is to set minOccurs to 0 and...
14 Jun 2017 by Kornfeld Eliyahu Peter
4 Jul 2018 by Krishna P Seetharaman
Issues faced and learnings found during the generation of pipe delimited flat file generation
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...
21 Sep 2012 by Kuthuparakkal
Use the following xsl to strip off multiple namespaces: ...
25 Sep 2012 by Kuthuparakkal
Yes very much, use System.Xml namespace:http://msdn.microsoft.com/en-us/library/y3y47afh.aspx[^]
3 Jun 2015 by KVPalem
I have defined .xsd file by using complex types with xsd:sequenceSo it means the xml which I generate need to follow the sequence defined in .xsdHere problem is i can't modify the .xsd to do any changes. and i dont have control while XML generation.what i have is an .xsd file and...
23 Jul 2015 by KVPalem
We are trying to validate xml based on schema with below codeXElement xmldata = XElement.Load(@"Ad.xml");XDocument acordRequestxml = XDocument.Parse(xmldata.ToString());XmlSchemaSet schemaSet = new XmlSchemaSet();schemaSet.Add("", @"Schema.xsd");acordRequestxml.Validate(schemaSet,...
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...
28 Apr 2015 by Lalyka
I am writing a XML validator with xsdbelow is what I did,but when I reach the line while (list.Read()) it gives me the error "There is no Unicode byte order mark. Cannot switch to Unicode." can anybody help me fix it?public class Validator { public void Validate(string...
31 May 2016 by Lalyka
I have a xml schema that based on that I have generated the schema class.I am using xmlserializer and I have tried to add nillable="true" so that it shows me the elements that are not null.What I have tried:it shows me the result like this: Test ...
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...
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...
3 Feb 2014 by Maarten Kools
You can create your own type, like so: And then use it like this
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...
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.
14 Oct 2014 by Maciej Los
If you have got an *.xml file or class definition, i'd suggest to use xsd.exe tool[^], which enables you to create *.xsd file.On the other site, please see this: Nillable Attribute Binding Support[^]
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]
29 Oct 2014 by Maciej Los
I'd suggest to use xsd.exe[^], which is helpful when you want to create xsd from xml file.For further information, please see:How to: Use the XML Schema Definition Tool to Generate Classes and XML Schema Documents[^]Auto generating Entity classes with xsd.exe for XML Serialization and...
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...
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...
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
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!
25 Oct 2014 by madhuabhi
I know we can use generate xml file option in eclipse. But I want the process to be automated
11 Nov 2012 by Manjunathmh
I have an XSD which validate any given xml file and list the errors(giving line number and position).How to resolve these errors pragmatically and update the tags eg: The schema validate tag should not have as his child This is an invalid fileit gives error...
29 Oct 2014 by Manoor Hebbar
I need to create a recursive XSD schema that validates a tree structure of an XML document.Sample XML: ...
19 Sep 2013 by MarkTJohnson
I've been working with xsd for all of 3 weeks now and I am finally starting to understand the basics of how it works but I have found a problem in either the SQLXMLBulkLoad process or the way the xsd is structured. ...
24 Feb 2012 by Martin Arapovic
Hi,Check this tool.http://xsd2code.codeplex.com/[^]Maybe it has feature that can fit your needs...
3 Jun 2013 by marwa_e
hello i am having a problem with an XSD (XML schema) i wrote a php code to extract an XSD schema file from mysql database but there is something wrong in the schema validation but i dont get it :(here is the schema that i get
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...
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[^]
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...
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....
11 Nov 2013 by Member 10329703
I have following 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.
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.