2 Replies Latest reply: Nov 20, 2012 11:35 AM by gnsandeep RSS

    Generating XML instance from XSD

    gnsandeep
      Hi,

      I want to know ( java program etc ) to generate XML instance from XSD. How tools ( XML Spy, Oxygen ) generate sample XML file from XSD. What APIs can be used for generating XML from XSD and what APIs are used for checking If XML instance conforms to a XSD? Is it big deal to implement it?

      Thanks in advance

      Sandeep
        • 1. Re: Generating XML instance from XSD
          gnsandeep
          To validate xml against XSD , I found I can use the existing parsers( using JAXP which has SAX and DOM APIs ) in current JDKs and validate. I still did not find the best way to generate xml from XSD and how tools like xml spy and oxygen generates sample xml file from xsd.

          Thanks
          Sandeep
          • 2. Re: Generating XML instance from XSD
            gnsandeep
            To validate xml against XSD , I found I can use the existing parsers( using JAXP which has SAX and DOM APIs ) in current JDKs and validate. I still did not find the best way to generate xml from XSD and how tools like xml spy and oxygen generates sample xml file from xsd.

            Thanks
            Sandeep