当前位置: 首页>>代码示例>>Java>>正文


Java类com.sun.xml.internal.xsom.parser.XMLParser代码示例

以下是Javacom.sun.xml.internal.xsom.parser.XMLParser的代码示例。类XMLParser属于com.sun.xml.internal.xsom.parser包,如果您正苦于以下问题:Java XMLParser类的具体用法?Java XMLParser怎么用?Java XMLParser使用的例子?那么恭喜您, 这里整理的类代码示例例程将为您提供帮助。

本文一共展示了XMLParser的8个开源代码实例,这些例子默认根据受欢迎程度排序。您可以为喜欢的代码打CALL点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ParserContext

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
public ParserContext( XSOMParser owner, XMLParser parser ) {
    this.owner = owner;
    this.parser = parser;

    try {
        parse(new InputSource(ParserContext.class.getResource("datatypes.xsd").toExternalForm()));

        SchemaImpl xs = (SchemaImpl)
            schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
        xs.addSimpleType(schemaSet.anySimpleType,true);
        xs.addComplexType(schemaSet.anyType,true);
    } catch( SAXException e ) {
        // this must be a bug of XSOM
        if(e.getException()!=null)
            e.getException().printStackTrace();
        else
            e.printStackTrace();
        throw new InternalError();
    }
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:ParserContext.java


示例2: ParserContext

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
public ParserContext( XSOMParser owner, XMLParser parser ) {
    this.owner = owner;
    this.parser = parser;

    try (InputStream is = ParserContext.class.getResourceAsStream("datatypes.xsd")) {
        InputSource source = new InputSource(is);
        source.setSystemId("datatypes.xsd");
        parse(source);

        SchemaImpl xs = (SchemaImpl)
                schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
        xs.addSimpleType(schemaSet.anySimpleType,true);
        xs.addComplexType(schemaSet.anyType,true);
    } catch( SAXException | IOException e ) {
        // this must be a bug of XSOM
        throw new InternalError(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目:openjdk-jdk10,完整代码来源:ParserContext.java


示例3: createXSOMParser

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
/**
 * Potentially problematic - make sure the parser instance passed is initialized
 * with proper security feature.
 *
 * @param parser
 * @return
 */
public XSOMParser createXSOMParser(XMLParser parser) {
    // set up other parameters to XSOMParser
    XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser));
    reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt));
    reader.setErrorHandler(errorReceiver);
    reader.setEntityResolver(opt.entityResolver);
    return reader;
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:ModelLoader.java


示例4: createXSOMParser

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
public XSOMParser createXSOMParser(XMLParser parser) {
    // set up other parameters to XSOMParser
    XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser));
    reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt));
    reader.setErrorHandler(errorReceiver);
    reader.setEntityResolver(opt.entityResolver);
    return reader;
}
 
开发者ID:alexkasko,项目:openjdk-icedtea7,完整代码来源:ModelLoader.java


示例5: SAXParserFactoryAdaptor

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
public SAXParserFactoryAdaptor( XMLParser _parser ) {
    this.parser = _parser;
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:SAXParserFactoryAdaptor.java


示例6: DOMForestParser

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
/**
 * @param fallbackParser This parser will be used when DOMForestParser needs to parse
 *                       documents that are not in the forest.
 */
public DOMForestParser(DOMForest forest, XMLParser fallbackParser) {
    this.forest = forest;
    this.scanner = new DOMForestScanner(forest);
    this.fallbackParser = fallbackParser;
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:DOMForestParser.java


示例7: DOMForestParser

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
/**
 * @param fallbackParser
 *      This parser will be used when DOMForestParser needs to parse
 *      documents that are not in the forest.
 */
DOMForestParser( DOMForest forest, XMLParser fallbackParser ) {
    this.forest = forest;
    this.scanner = new DOMForestScanner(forest);
    this.fallbackParser = fallbackParser;
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:DOMForestParser.java


示例8: XMLSchemaParser

import com.sun.xml.internal.xsom.parser.XMLParser; //导入依赖的package包/类
private XMLSchemaParser(XMLParser baseParser) {
    this.baseParser = baseParser;
}
 
开发者ID:SunburstApps,项目:OpenJSharp,完整代码来源:ModelLoader.java



注:本文示例均筛选自Github平台上各路大神开发的开源项目,代码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。