Examples of XsdReader


Examples of com.laamella.snelxml.generator.xsdreader.XsdReader

import static org.junit.Assert.assertEquals;

public class XsdReaderTest {
  @Test
  public void generateSampleXml() throws Exception {
    XsdReader xsdReader = new XsdReader();
    String serviceName = "ship-order";
    XSModel xsModel = xsdReader.createSchemaLoader().loadURI(new File(Root.testResourcesDirectory(), serviceName + ".xsd").toURI().toString());
    final Schema someXsd = new XsdReader().readXsd(serviceName, xsModel);

        assertEquals(serviceName, someXsd.name);
    }
View Full Code Here

Examples of com.laamella.snelxml.generator.xsdreader.XsdReader

import com.laamella.snelxml.generator.xsdreader.XsdReader;

public class SampleXmlGeneratorTest {
  @Test
  public void generateSampleXml() throws Exception {
    XsdReader xsdReader = new XsdReader();
    String serviceName = "ship-order";
    XSModel xsModel = xsdReader.createSchemaLoader().loadURI(new File(Root.testResourcesDirectory(), serviceName + ".xsd").toURI().toString());
    final Schema someXsd = new XsdReader().readXsd(serviceName, xsModel);

    final SampleXmlGenerator sampleXmlGenerator = new SampleXmlGenerator(new FileOutputStreamFactory(new File("target/"))){
      @Override
      protected void tweakStreamWriter(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
        xmlStreamWriter.setPrefix("ex", "http://www.w3schools.com/schema/schema_example");
View Full Code Here

Examples of com.laamella.snelxml.generator.xsdreader.XsdReader

import com.laamella.snelxml.generator.xsdreader.XsdReader;

public class StructurePrinterTest {
    @Test
    public void generatorTest() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        XsdReader xsdReader = new XsdReader();
        String serviceName = "ship-order";
        XSModel xsModel = xsdReader.createSchemaLoader().loadURI(new File(Root.testResourcesDirectory(), serviceName + ".xsd").toURI().toString());
        final Schema someXsd = new XsdReader().readXsd(serviceName, xsModel);
        Block block = new Block();
        new ModelPrinter(block).print(someXsd);
        System.out.print(block);
    }
View Full Code Here

Examples of org.modeshape.sequencer.xsd.XsdReader

    protected void processTypes( Types types,
                                 Node parentNode ) throws Exception {
        if (types == null) {
            return;
        }
        XsdReader xsdReader = new XsdReader(context);
        for (Object obj : types.getExtensibilityElements()) {
            if (obj instanceof Schema) {
                processSchema((Schema)obj, parentNode, xsdReader);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.