xsd

Selecting Nodes in XSD schema using Xpath

自古美人都是妖i 提交于 2020-01-15 18:47:31
问题 I have the following code that I wish to use to select all the elements I will need in a certain sequence. Here's the snippet: XmlDocument schema = new XmlDocument(); schema.Load(SchemaFileName); XmlNamespaceManager xnm = new XmlNamespaceManager(schema.NameTable); xnm.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema"); XmlNodeList list = schema.SelectNodes(Path); However, I'm not sure what I should write as the path. Ideally I want to select all the child nodes of the "sequence" tag, but

Selecting Nodes in XSD schema using Xpath

柔情痞子 提交于 2020-01-15 18:47:03
问题 I have the following code that I wish to use to select all the elements I will need in a certain sequence. Here's the snippet: XmlDocument schema = new XmlDocument(); schema.Load(SchemaFileName); XmlNamespaceManager xnm = new XmlNamespaceManager(schema.NameTable); xnm.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema"); XmlNodeList list = schema.SelectNodes(Path); However, I'm not sure what I should write as the path. Ideally I want to select all the child nodes of the "sequence" tag, but

Prevent generation of duplicate classes from XSDs without namespaces

走远了吗. 提交于 2020-01-15 17:36:02
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

Prevent generation of duplicate classes from XSDs without namespaces

白昼怎懂夜的黑 提交于 2020-01-15 17:35:42
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

Prevent generation of duplicate classes from XSDs without namespaces

ぐ巨炮叔叔 提交于 2020-01-15 17:35:33
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

ObjectFactory methods generated by jaxb

假装没事ソ 提交于 2020-01-15 15:44:41
问题 I am trying to make web services but there are two situations I am getting. There are two types of xsd file 1st one is: <xsd:element name="signupRequest"> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="email" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element <xsd:element name="signupResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="signup" type="tns:Signup"/> </xsd:sequence> </xsd:complexType> </xsd:element>

ObjectFactory methods generated by jaxb

我只是一个虾纸丫 提交于 2020-01-15 15:41:33
问题 I am trying to make web services but there are two situations I am getting. There are two types of xsd file 1st one is: <xsd:element name="signupRequest"> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="email" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element <xsd:element name="signupResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="signup" type="tns:Signup"/> </xsd:sequence> </xsd:complexType> </xsd:element>

ObjectFactory methods generated by jaxb

核能气质少年 提交于 2020-01-15 15:41:00
问题 I am trying to make web services but there are two situations I am getting. There are two types of xsd file 1st one is: <xsd:element name="signupRequest"> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="email" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element <xsd:element name="signupResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="signup" type="tns:Signup"/> </xsd:sequence> </xsd:complexType> </xsd:element>

XSD sequence compile to different lists

被刻印的时光 ゝ 提交于 2020-01-15 12:33:54
问题 I have XSD schema like this: <xs:complexType name="Element" abstract="true"> <xs:sequence maxOccurs="unbounded"> <xs:element name="resistor" type="vs:Resistor" maxOccurs="unbounded"/> <xs:element name="capacitor" type="vs:Capacitor" maxOccurs="unbounded"/> <xs:element name="inductor" type="vs:Inductor" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> And when I process this schema through JAXB I get a field like this: @XmlElements({ @XmlElement(name = "resistor", required = true, type

XSD sequence compile to different lists

人走茶凉 提交于 2020-01-15 12:33:05
问题 I have XSD schema like this: <xs:complexType name="Element" abstract="true"> <xs:sequence maxOccurs="unbounded"> <xs:element name="resistor" type="vs:Resistor" maxOccurs="unbounded"/> <xs:element name="capacitor" type="vs:Capacitor" maxOccurs="unbounded"/> <xs:element name="inductor" type="vs:Inductor" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> And when I process this schema through JAXB I get a field like this: @XmlElements({ @XmlElement(name = "resistor", required = true, type