Examples of Parser


Examples of com.sun.xml.parser.Parser

        return parse(is, DefaultXMLValidate);
    }

    private XMLTree parse(InputSource is, boolean validate)
    throws IOException, SAXParseException, SAXException {
        Parser parser = (validate) ?
      new ValidatingParser(true) : new Parser();
  Resolver resolver = new Resolver();
  XmlDocumentBuilder builder = new XmlDocumentBuilder();
  // Server.xml is not validated and has no DTD ( and will change for a while)
  //   URL serverURL = this.getClass().getResource(
  //             Constants.DTD.Server.Resource);
  URL webApplicationURL = this.getClass().getResource(
            Constants.WEB_XML_Resource);

//   resolver.registerCatalogEntry(Constants.DTD.Server.PublicId,
//             serverURL.toString());
  resolver.registerCatalogEntry(
      Constants.WEB_XML_PublicId,
      webApplicationURL.toString());

  try {
      // parser.setFastStandalone(true);
      parser.setEntityResolver(resolver);
      builder.setDisableNamespaces(true);
      builder.setParser(parser);
      parser.parse(is);

      doc = builder.getDocument();
  } catch (Exception e) {
      String systemId = "";
      int lineNumber = -1;
View Full Code Here

Examples of com.sun.xml.ws.api.wsdl.parser.XMLEntityResolver.Parser

                                      boolean isClientSide, Container container, @NotNull PolicyResolver policyResolver,
                                      WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
        assert resolver != null;

        RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver), isClientSide, container, policyResolver, extensions);
        Parser parser;
        try{
            parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource);
            if(!hasWSDLDefinitions(parser.parser)){
                throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId,
                        WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation()));
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.Parser

    }

    public JavaSource addSource(Reader reader, String sourceInfo) {
        ModelBuilder builder = new ModelBuilder(classLibrary, docletTagFactory);
        Lexer lexer = new JFlexLexer(reader);
        Parser parser = new Parser(lexer, builder);
        parser.setDebugLexer(debugLexer);
        parser.setDebugParser(debugParser);
        try {
            parser.parse();
        } catch (ParseException e) {
            e.setSourceInfo(sourceInfo);
            throw e;
        }
        JavaSource source = builder.getSource();
View Full Code Here

Examples of com.toc.dton.notation.xml.parser.Parser

    try {
      XMLStreamWriter writer = XMLHelper.createXMLStreamWriter(resultStream, "UTF-8");
      writer.writeStartDocument("UTF-8", "1.0");
      writer.writeStartElement(XMLNotationDefinition.DTON);
     
      Parser parser = ParserFactory.create(object);
      parser.parse(object, writer);
     
      writer.writeEndElement();
      writer.writeEndDocument();
    } catch(Exception e) {
      throw ExceptionHelper.parse(e);
View Full Code Here

Examples of com.vaadin.sass.internal.parser.Parser

        if (source == null) {
            return null;
        }
        source.setEncoding(encoding);

        Parser parser = new Parser();
        parser.setErrorHandler(new SCSSErrorHandler());
        parser.setDocumentHandler(handler);

        try {
            parser.parseStyleSheet(source);
        } catch (ParseException e) {
            // catch ParseException, re-throw a SCSSParseException which has
            // file name info.
            throw new SCSSParseException(e, identifier);
        }

        stylesheet.setCharset(parser.getInputSource().getEncoding());
        return stylesheet;
    }
View Full Code Here

Examples of com.xmlcalabash.model.Parser

        collections = null;
        cookieStores = new HashMap<String, CookieStore>();

        xprocData = new XProcData(this);

        parser = new Parser(this);
        try {
            // FIXME: I should *do* something with these libraries, shouldn't I?
            standardLibrary = parser.loadStandardLibrary();
            if (errorCode != null) {
                throw new XProcException(errorCode, errorMessage);
View Full Code Here

Examples of danbikel.parser.Parser

                std_input += token + " ";
            }
        }
       
        Settings.load(settingFilePath);
        Parser parser = new Parser(modelFilePath);
        System.out.print("Parsing input: " + std_input);
        String sent = "(" + std_input.trim() + ")";
        Sexp inpSent = Sexp.read(sent);
        Sexp parsedTree = parser.parse((SexpList) inpSent);
        String parse = parsedTree.toString();
        parse = parse.replaceAll("\\[.*?\\]", "");
        System.out.println("Parsing output: " + parse);
        return parse;
    }
View Full Code Here

Examples of de.maramuse.soundcomp.parser.Parser

public class TimingTests extends TestCase {
  /**
   * code to verify the timeline creation
   */
  public void testTimeline() throws Exception {
  Parser parser=new Parser();
  parser.setDebug(false);
  parser.setOptimize(true);
 
  List<String> paths=new ArrayList<String>();
  File file=new File("javasrc/de/maramuse/soundcomp/test/testfiles/tempotest");
  Preprocessor.setDebug(false);
  ParserVal p=parser.parse(file, paths);
  if(p==null){
    SCParser.ParserVal val=parser.getLastSymbol();
    if(val==null){
    fail("no result and no error text");
    return;
    }
    String filename=val.getFilename();
    if(filename==null)
    filename="direct input";
    parser.dumpStack();
    fail(String.format("%s after reading %s(%s), %s, %d",
      parser.getError(),
      parser.getSymbol(val.getType()), val.getText(),
      val.getFilename(),
      val.getLine()));
  }
  if(!(p instanceof SoundCompText))
    fail("Parsing didn't create a SoundCompText object");
View Full Code Here

Examples of de.neuland.jade4j.parser.Parser

  public Optional<S3Configuration> s3Configuration(final SingularityConfiguration config) {
    return config.getS3Configuration();
  }

  private JadeTemplate getJadeTemplate(String name) throws IOException {
    Parser parser = new Parser("templates/" + name, JadeHelper.JADE_LOADER);
    Node root = parser.parse();

    final JadeTemplate jadeTemplate = new JadeTemplate();

    jadeTemplate.setTemplateLoader(JadeHelper.JADE_LOADER);
    jadeTemplate.setRootNode(root);
View Full Code Here

Examples of de.tuhrig.thofu.interfaces.Parser

              logger.info("Input: " + commands);

              history.add(0, commands);
   
              Parser parser = interpreter.getParser();

              // + nl, otherwise there will be errors
              commands = parser.format(commands + "\n");

              List<LObject> objects = parser.parseAll(commands);
           
              Executer.instance.evaluate(textArea, objects, interpreter);
            }
            catch (Exception e) {
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.