xsd

accessing the elements of an XSD file in c#

蹲街弑〆低调 提交于 2020-01-03 05:31:06
问题 I have searched through S/O but not found anything to resolve my issue (though C# - Parsing XSD schema - get all elements to combobox has helped a little). In the XSD file below, I need to get the name of the nested elements (SectionA and then to AX010_1, AX040_1.. then to SectionB and to BX010_1, BX070_1 etc) How can I access the nested elements? <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault=

Apache Axis - Calendar instance that gets serialized to 0001-01-01T00:00:00.000Z

我与影子孤独终老i 提交于 2020-01-03 05:09:37
问题 I'm using Apache Axis to communicate with a web service written in .Net. One of the functions in that WS has special handling when it encounters DateTime.MinDate (i.e. "0001-01-01"). Now, I'm trying to send this special value to the WS, but there seems to be no equivalent to DateTime.MinDate in Java. As you probably know, Axis wraps xsd:dateTime into Calendar objects, so I tried sending new GregorianCalendar(1 ,1 ,1); but this didn't do the trick. I tried calendar.setTime(new Date(0)) , I

How can I make JAXB to fail when a mandatory element is missing?

天涯浪子 提交于 2020-01-03 04:34:10
问题 I'm trying to add some forward compatibility to a Java application calling a Web Service at work, but JAXB seems to behave backward on the subject... The application use the wsdl2java Maven plugin to generate a CXF Web Service client from a WSDL. It then uses that generated client to communicate with a Web Service (through SOAP over JMS). When the Web Service sends an unknown element in its response to a call, JAXB fails with an "unexpected element" error, which is understandable, and XML

Creating Word or XML document with VBA

北城以北 提交于 2020-01-03 03:50:20
问题 I need to create documents, (~150 reports, letters) mostly from pre-existing snippets and local databases, with VBA, in Word 2003. I then need to change specific parts of those snippets, such as dates, phrases, user information, &c. There are also, obviously, some bits that I will generate in my program. Currently, this same task is done (sort of) by some hideous legacy VBA. (Nested IFs and FORs, and over 200 textboxes all called TextBox#) It gets the job done SOMETIMES, and does so by

How to get all xpaths from a XSD?

时光毁灭记忆、已成空白 提交于 2020-01-03 03:40:10
问题 I have an XSD and the requirement is to list the xpath of all the elements present in XSD into UI, so users can use it to perform some DOM related operations. Can I programatically extract xpaths of all the elements from XSD? 回答1: It can be done, though you need to be aware that the set of all permitted paths is infinite (for example because of recursion or because of wildcards) so you will need a smart representation of this infinite set, or your code will need to give up and return

XSD. Different between xsd:element and xs:element?

主宰稳场 提交于 2020-01-03 03:36:29
问题 I reading articles about XSD on w3schools and here many examples. For example this: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> But after I tried put this .xsd file in xjc -

Generating beans for wix.xsd with jaxb fails since schema seems to be invalid

房东的猫 提交于 2020-01-03 03:05:37
问题 I'm using JAXB (from Java 7) to generate beans for the schema definitions of WiX. But this generation fails since the wix.xsd (from the source tree of WiX 3.7) contains some regex with word boundary and other delimiters which are not allowed in a regex inside an xml schema definition. Is there any way to proceed besides changing the schema definitions? 来源: https://stackoverflow.com/questions/17680481/generating-beans-for-wix-xsd-with-jaxb-fails-since-schema-seems-to-be-invalid

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found

无人久伴 提交于 2020-01-03 02:54:30
问题 I am trying to understand <any> element in xsd. I had two xsds. Book Catalogue.xsd <?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="BookCatalogue"> <xs:complexType> <xs:sequence> <xs:element name="Book" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Title" type="xs:string" /> <xs:element name=

Emded XHTML snippet in XML document, and validate against a schema

时光怂恿深爱的人放手 提交于 2020-01-02 13:56:07
问题 Essentially I want to embed some XHTML in an XML document that must validate against a custom schema. Full background: I have a webservice that consumes an XML document. This XML document is validated against a custom schema. The data in the XML is parsed and stored in a database, and displayed in a useful format on a website. The customer who fires the XML at my webservice has its own internal "IT / programmer guy". He wants to be able to display some custom XHMTL in some placeholders on

Is there a way to expose a static XSD in Spring WS 2?

北城余情 提交于 2020-01-02 12:40:47
问题 If, for example orders.wsdl imports Orders.xsd, how can it be configured using static-wsdl <sws:static-wsdl id="orders" location="/WEB-INF/wsdl/orders.wsdl"/> such that Orders.xsd can be viewed in the browser like http://host/context/Orders.xsd Dynamic wsdl supports it. <sws:dynamic-wsdl id="orders" portTypeName="Orders" locationUri="http://localhost:8080/ordersService/"> <sws:xsd location="/WEB-INF/xsd/Orders.xsd"/> </sws:dynamic-wsdl> But static-wsdl doesn't have the sws:xsd property. 回答1: