xsd

How can I get element type (e.g. float) and attributes (e.g. MaxOccurs) from an XML file & corresponding XSD?

I need to be able to take an XML file and corresponding XSD at runtime and derive an array of elements and associated attributes. I've seen a few posts e.g.: http://www.java2s.com/Code/Java/XML/ProvidesatraceoftheschematypeinformationforelementsandattributesinanXMLdocument.htm that suggest using a sax parser to iterate through the do...

Generate PDF w/iTextSharp from database items

Deleted, not a valid scenario. ...

NetBeans: How to provide offline XML schemas?

I would like to have the code completion and XML validation that comes from NetBeans having access to the schemas referenced in XML documents. Unfortunately I need to use NetBeans in an offline (completely disconnected from the Internet) location, meaning NetBeans fails in downloading the referenced .xsd files. However, I have all of t...

xsd.exe generates weird C# class for XML serialization

Hi, I have an XML schema in .xdr file. This is a shortened version of this file(just for example): <?xml version = "1.0" encoding = "WINDOWS-1252"?> <Schema name = "ANS.xdr" xmlns = "urn:schemas-microsoft-com:xml-data" xmlns:dt = "urn:schemas-microsoft-com:datatypes"> <ElementType name = "Shipment" content = "eltOnly" order ...

Is there a XSD-driven random XML test data generator?

For stress tests, I would like to create XML files based on a XSD with random (but valid!) test data. Is there a tool which can read a (simple) XSD file and build a XML file based on the schema definition? ...

StackOverflowException when calling XmlElement.OuterXml on deeply nested xml

I am having a problem validating some XML input data on my WebService. I am including everything you should need to reproduce the error, so hopefully someone will be able to help me. Thank you in advance! I have some hacker who is sending me some invalid XML to my public interface and instead of being detected in my XSD validation, it...

Word 2003 XML: Looking for XSL or XSD to render the document in browser

I've used OpenOffice 3.2 to convert a word doc into Microsoft Word 2003 XML. I am looking for and XSD or XSL that I can append to the document to show it in my browser. Can anyone point me in the right direction> ...

Automatic editor of XML (based on XSD scheme)

Is there any approach to generate editor of an XML file basing on an XSD scheme? (It should be a Java or Python web based editor). ...

XML parsing failure - [s4s-elt-invalid-content.1]

I'm having problems while parsing a XML file. The XML schema used is: <xsd:complexType name="QuoteFIBondPrice"> <xsd:complexContent> <xsd:sequence> <xsd:element name="BidPrice" type="QuoteFIBondValue" minOccurs="0"/> <xsd:element name="MidPrice" type="QuoteFIBondValue" minOccurs="0"/> <xsd...

Generating java classes from xsd files

Hi, I have got a xsd files from some thirdparty which used to be with "include" and not "import". I am using these xsd file to generate java files, using jaxb. The initial xsd structure resulted in output in which same classe were included in different packages. for example, if two packages were generated, "aa" and "bb", both included th...

Importing Multiple XSD Files into Eclipse's XML Catalog

We presently have about 15 different XSD files that define the many XML configuration files available to developers configuring our project. Is there any convenient way to import all of these into the XML Catalog in a simple pass? Although multiple select would be better than importing the files one at a time (as we presently have to do...

Add an array to an XSD file to assign users to a permissions specification

I am not a programmer, so this may or may not make sense, but I would like to be able to link an external data file to an XSD file to specify whether a user belongs to a certain group. Without linking, the code currently stands as: <xs:element name="user"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumer...

Why doesn't the /reference option to svcutil.exe work?

I'm attempting to use svcutil.exe to generate -only- the service contracts (interfaces) from a set of .wsdl files. When I do this (from an http-hosted wsdl), it picks up the included schemas and generates all the code for them. Great. What I would REALLY like to do, however, is to use a set of classes already generated from the schema ...

How to omit XML element in C# XML generated from XSD?

Minoccurs is 0 in the XSD and nillable is true for an element. But if I don't set the element value, it takes it as null and the record is blanked out on the server. Is there a way to tell it to omit the element from the output XML when some conditions are satisfied but have it for other cases? <xs:element name='CLS_CD' minOccurs='0'...

Creating DataSet class using XSD ...

Hi, Does anyone know what is wip_pack-1.5.xsd? I build my project with VC2003(VC ver 7.1.3088, .Net 1.1 ver 1.1.4322 SP1) on XP(SP3) and got following linking error: /////////////////////// Creating DataSet class using XSD ... Error: There was an error processing '.\Templates\Xsd\wip_pack-1.5.xsd'. Type 'kam.intraFACTORY.jaxb.standa...

create xsd schema with <any> node that contains attributes

Hello all, I want to create an xsd schema with an xs:any element that contains an attribute. something like this <xs:element name="Task"> <xs:element name="any" type="xs:anyType"> <xs:attribute name="type" type="xs:string" /> </xs:element> </xs:element> But apparently this is not a valid schema. What I want to accomplis...

Xsd, Validate empty or minimum length string

Currently I have an Xsd validating with this rule <xs:simpleType name='shipTo'> <xs:restriction base='xs:string'> <xs:minLength value='6'/> </xs:restriction> </xs:simpleType> I need to allow blanks as well, but if a value is entered, it's minimum length should still be 6. Can I do this without resorting to this xs:pat...

How to restrict parent on the attribute?

Take a look at this example. Now in the attribute.xsd there is an gender attribute defined. But as I understand I can use this attribute wherever the family.xsd would have anyAttribute. Is it possible to restrict gender attribute to a certain parent based on parent's name? ...

How do you take an XML file and insert its values into a database table using SSIS (SQL Server 2005)

I have XML (see below). I need to insert the records in this XML file into a SQL Server 2005 table using SSIS. I'm stuck with the xsd file description. Within Visual Studio when I click the Generate XSD button I get the message "Unable to infer the XSD from the XML file. The XML contains multiple namespaces." Does anyone know of a g...

JAXB: setting complexTypes to use existing java classes.

Currently, JAXB is creating a point class from the xml schema I have specified. However, I would prefer it to use the existing java.awt.Point class. And for any other types I have defined to use and import java.awt.Point too. Here is my point code: <xs:complexType name="point"> <xs:sequence> <xs:element name="x" type="xs:int" /> ...