How to validate xml with 'minOccurs' in Java?










0














I'm using javax.xml.validation.Validator for validating xml against schema. I have a requirement where the input xml contains 'minOccurs' and 'maxOccurs' fields. If I validate this against schema, I'm getting org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 7; cvc-complex-type.3.2.2: Attribute 'minOccurs' is not allowed to appear in element. How to resolve this?



Validation:



URL url;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
url = classLoader.getResource(schemaLocation);
String xsd = url.toURI().getPath();
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
File f = new File(xsd);
schema = factory.newSchema(f);
Validator valid = schema.newValidator();
StringReader xml = new StringReader(request);
valid.validate(new StreamSource(xml));
xml.close();


XSD:



<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="order">
<xs:complexType>
<xs:sequence>
<xs:element name="item">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


XML:



<order> 
<item>
<name minoccurs="1" maxOccurs="unbounded">apple</name>
</item>
</order>









share|improve this question




























    0














    I'm using javax.xml.validation.Validator for validating xml against schema. I have a requirement where the input xml contains 'minOccurs' and 'maxOccurs' fields. If I validate this against schema, I'm getting org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 7; cvc-complex-type.3.2.2: Attribute 'minOccurs' is not allowed to appear in element. How to resolve this?



    Validation:



    URL url;
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    url = classLoader.getResource(schemaLocation);
    String xsd = url.toURI().getPath();
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    File f = new File(xsd);
    schema = factory.newSchema(f);
    Validator valid = schema.newValidator();
    StringReader xml = new StringReader(request);
    valid.validate(new StreamSource(xml));
    xml.close();


    XSD:



    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="order">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="item">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>


    XML:



    <order> 
    <item>
    <name minoccurs="1" maxOccurs="unbounded">apple</name>
    </item>
    </order>









    share|improve this question


























      0












      0








      0







      I'm using javax.xml.validation.Validator for validating xml against schema. I have a requirement where the input xml contains 'minOccurs' and 'maxOccurs' fields. If I validate this against schema, I'm getting org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 7; cvc-complex-type.3.2.2: Attribute 'minOccurs' is not allowed to appear in element. How to resolve this?



      Validation:



      URL url;
      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      url = classLoader.getResource(schemaLocation);
      String xsd = url.toURI().getPath();
      SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
      File f = new File(xsd);
      schema = factory.newSchema(f);
      Validator valid = schema.newValidator();
      StringReader xml = new StringReader(request);
      valid.validate(new StreamSource(xml));
      xml.close();


      XSD:



      <?xml version="1.0" encoding="UTF-8" ?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="order">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="item">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>


      XML:



      <order> 
      <item>
      <name minoccurs="1" maxOccurs="unbounded">apple</name>
      </item>
      </order>









      share|improve this question















      I'm using javax.xml.validation.Validator for validating xml against schema. I have a requirement where the input xml contains 'minOccurs' and 'maxOccurs' fields. If I validate this against schema, I'm getting org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 7; cvc-complex-type.3.2.2: Attribute 'minOccurs' is not allowed to appear in element. How to resolve this?



      Validation:



      URL url;
      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      url = classLoader.getResource(schemaLocation);
      String xsd = url.toURI().getPath();
      SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
      File f = new File(xsd);
      schema = factory.newSchema(f);
      Validator valid = schema.newValidator();
      StringReader xml = new StringReader(request);
      valid.validate(new StreamSource(xml));
      xml.close();


      XSD:



      <?xml version="1.0" encoding="UTF-8" ?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="order">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="item">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>


      XML:



      <order> 
      <item>
      <name minoccurs="1" maxOccurs="unbounded">apple</name>
      </item>
      </order>






      java xml xsd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 at 7:42

























      asked Nov 12 at 7:12









      Malini Kennady

      5610




      5610






















          2 Answers
          2






          active

          oldest

          votes


















          0














          Trying to validate your XML againt the provided XSD will give you the following error:




          Attribute 'minoccurs' Cannot Appear In Element 'element'.




          The XSD Indicators specification tells that Occurrence indicators are :




          maxOccurs



          minOccurs




          With an Uppercase 'O'



          Change your XSD to :



          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>


          And your XML to :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>





          share|improve this answer






















          • They probably also should not show up in the actual XML.
            – ophychius
            Nov 12 at 7:29










          • Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:44










          • You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
            – Nirekin
            Nov 12 at 7:48










          • I was wondering why this works in MSXML. Is this because of SAXParser?
            – Malini Kennady
            Nov 12 at 7:53










          • I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
            – Nirekin
            Nov 12 at 8:00



















          0














          You shouldn't put minoccurs="1" maxOccurs="unbounded" in the xml element name.



          What you need is :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>


          With your current code it's looking for an attribute minoccurs and maxOccurs which you didn't define in your xsd file.



          Edit :



          If you want to use minOccurs and maxOccurs as attributes of your element name and keep
          <name minOccurs="1" maxOccurs="unbounded">apple</name> then you need to declare those attributes in your XSD like so.



          <xs:complexType>
          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="minOccurs" type="xs:integer"/>
          <xs:attribute name="maxOccurs" type="xs:integer"/>
          </xs:complexType>





          share|improve this answer






















          • the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:56










          • I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
            – Nesku
            Nov 12 at 8:46










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257373%2fhow-to-validate-xml-with-minoccurs-in-java%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Trying to validate your XML againt the provided XSD will give you the following error:




          Attribute 'minoccurs' Cannot Appear In Element 'element'.




          The XSD Indicators specification tells that Occurrence indicators are :




          maxOccurs



          minOccurs




          With an Uppercase 'O'



          Change your XSD to :



          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>


          And your XML to :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>





          share|improve this answer






















          • They probably also should not show up in the actual XML.
            – ophychius
            Nov 12 at 7:29










          • Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:44










          • You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
            – Nirekin
            Nov 12 at 7:48










          • I was wondering why this works in MSXML. Is this because of SAXParser?
            – Malini Kennady
            Nov 12 at 7:53










          • I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
            – Nirekin
            Nov 12 at 8:00
















          0














          Trying to validate your XML againt the provided XSD will give you the following error:




          Attribute 'minoccurs' Cannot Appear In Element 'element'.




          The XSD Indicators specification tells that Occurrence indicators are :




          maxOccurs



          minOccurs




          With an Uppercase 'O'



          Change your XSD to :



          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>


          And your XML to :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>





          share|improve this answer






















          • They probably also should not show up in the actual XML.
            – ophychius
            Nov 12 at 7:29










          • Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:44










          • You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
            – Nirekin
            Nov 12 at 7:48










          • I was wondering why this works in MSXML. Is this because of SAXParser?
            – Malini Kennady
            Nov 12 at 7:53










          • I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
            – Nirekin
            Nov 12 at 8:00














          0












          0








          0






          Trying to validate your XML againt the provided XSD will give you the following error:




          Attribute 'minoccurs' Cannot Appear In Element 'element'.




          The XSD Indicators specification tells that Occurrence indicators are :




          maxOccurs



          minOccurs




          With an Uppercase 'O'



          Change your XSD to :



          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>


          And your XML to :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>





          share|improve this answer














          Trying to validate your XML againt the provided XSD will give you the following error:




          Attribute 'minoccurs' Cannot Appear In Element 'element'.




          The XSD Indicators specification tells that Occurrence indicators are :




          maxOccurs



          minOccurs




          With an Uppercase 'O'



          Change your XSD to :



          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>


          And your XML to :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 12 at 7:29

























          answered Nov 12 at 7:28









          Nirekin

          3,30111641




          3,30111641











          • They probably also should not show up in the actual XML.
            – ophychius
            Nov 12 at 7:29










          • Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:44










          • You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
            – Nirekin
            Nov 12 at 7:48










          • I was wondering why this works in MSXML. Is this because of SAXParser?
            – Malini Kennady
            Nov 12 at 7:53










          • I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
            – Nirekin
            Nov 12 at 8:00

















          • They probably also should not show up in the actual XML.
            – ophychius
            Nov 12 at 7:29










          • Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:44










          • You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
            – Nirekin
            Nov 12 at 7:48










          • I was wondering why this works in MSXML. Is this because of SAXParser?
            – Malini Kennady
            Nov 12 at 7:53










          • I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
            – Nirekin
            Nov 12 at 8:00
















          They probably also should not show up in the actual XML.
          – ophychius
          Nov 12 at 7:29




          They probably also should not show up in the actual XML.
          – ophychius
          Nov 12 at 7:29












          Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
          – Malini Kennady
          Nov 12 at 7:44




          Chaged XSD, though the same is validated correctly in MSXML. Any way to validate in Java?
          – Malini Kennady
          Nov 12 at 7:44












          You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
          – Nirekin
          Nov 12 at 7:48




          You need to remove minoccurs and maxOccurs from your XML file. If you let them into the XML, then the validation will look for two elements named "minoccurs" and "maxOccurs" which are not defined into your XSD.
          – Nirekin
          Nov 12 at 7:48












          I was wondering why this works in MSXML. Is this because of SAXParser?
          – Malini Kennady
          Nov 12 at 7:53




          I was wondering why this works in MSXML. Is this because of SAXParser?
          – Malini Kennady
          Nov 12 at 7:53












          I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
          – Nirekin
          Nov 12 at 8:00





          I do not know why, may be the SAX parser is more strict that the MS one you are using. For me the issue is not related to Java nor MS. If you use an agnostic xml validador like this one you will figure that tour initial XML was not valid against your original XSD...
          – Nirekin
          Nov 12 at 8:00














          0














          You shouldn't put minoccurs="1" maxOccurs="unbounded" in the xml element name.



          What you need is :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>


          With your current code it's looking for an attribute minoccurs and maxOccurs which you didn't define in your xsd file.



          Edit :



          If you want to use minOccurs and maxOccurs as attributes of your element name and keep
          <name minOccurs="1" maxOccurs="unbounded">apple</name> then you need to declare those attributes in your XSD like so.



          <xs:complexType>
          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="minOccurs" type="xs:integer"/>
          <xs:attribute name="maxOccurs" type="xs:integer"/>
          </xs:complexType>





          share|improve this answer






















          • the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:56










          • I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
            – Nesku
            Nov 12 at 8:46















          0














          You shouldn't put minoccurs="1" maxOccurs="unbounded" in the xml element name.



          What you need is :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>


          With your current code it's looking for an attribute minoccurs and maxOccurs which you didn't define in your xsd file.



          Edit :



          If you want to use minOccurs and maxOccurs as attributes of your element name and keep
          <name minOccurs="1" maxOccurs="unbounded">apple</name> then you need to declare those attributes in your XSD like so.



          <xs:complexType>
          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="minOccurs" type="xs:integer"/>
          <xs:attribute name="maxOccurs" type="xs:integer"/>
          </xs:complexType>





          share|improve this answer






















          • the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:56










          • I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
            – Nesku
            Nov 12 at 8:46













          0












          0








          0






          You shouldn't put minoccurs="1" maxOccurs="unbounded" in the xml element name.



          What you need is :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>


          With your current code it's looking for an attribute minoccurs and maxOccurs which you didn't define in your xsd file.



          Edit :



          If you want to use minOccurs and maxOccurs as attributes of your element name and keep
          <name minOccurs="1" maxOccurs="unbounded">apple</name> then you need to declare those attributes in your XSD like so.



          <xs:complexType>
          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="minOccurs" type="xs:integer"/>
          <xs:attribute name="maxOccurs" type="xs:integer"/>
          </xs:complexType>





          share|improve this answer














          You shouldn't put minoccurs="1" maxOccurs="unbounded" in the xml element name.



          What you need is :



          <order> 
          <item>
          <name>apple</name>
          </item>
          </order>


          With your current code it's looking for an attribute minoccurs and maxOccurs which you didn't define in your xsd file.



          Edit :



          If you want to use minOccurs and maxOccurs as attributes of your element name and keep
          <name minOccurs="1" maxOccurs="unbounded">apple</name> then you need to declare those attributes in your XSD like so.



          <xs:complexType>
          <xs:sequence>
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="minOccurs" type="xs:integer"/>
          <xs:attribute name="maxOccurs" type="xs:integer"/>
          </xs:complexType>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 12 at 9:06

























          answered Nov 12 at 7:29









          Nesku

          318111




          318111











          • the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:56










          • I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
            – Nesku
            Nov 12 at 8:46
















          • the same is validated correctly in MSXML. Any way to validate in Java?
            – Malini Kennady
            Nov 12 at 7:56










          • I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
            – Nesku
            Nov 12 at 8:46















          the same is validated correctly in MSXML. Any way to validate in Java?
          – Malini Kennady
          Nov 12 at 7:56




          the same is validated correctly in MSXML. Any way to validate in Java?
          – Malini Kennady
          Nov 12 at 7:56












          I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
          – Nesku
          Nov 12 at 8:46




          I'm not familiar with MSXML, like @Nirekin said it could be that it's not as strict. If you want your original XML to work you need to declare those attributes in your XSD or see this post to allow unknown attributes XML validation - known and unknown attributes.
          – Nesku
          Nov 12 at 8:46

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257373%2fhow-to-validate-xml-with-minoccurs-in-java%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

          Museum of Modern and Contemporary Art of Trento and Rovereto