Package org.xml.sax

Examples of org.xml.sax.InputSource


    public void parse(InputStream is) throws Exception {
        //DocumentTable store = new ProfiledDocumentTable(File.createTempFile("dtm_profile", "csv"));
        IDocumentTable store = new DocumentTable();
        DocumentTableBuilder handler = new DocumentTableBuilder(store);
        XMLReader reader = getXMLReader(handler);
        reader.parse(new InputSource(new BufferedInputStream(is)));
    }
View Full Code Here


    dozerResolver = new DozerResolver();
  }

  @Test
  public void testResolveEntity_OK() {
    InputSource inputSource = dozerResolver.resolveEntity(null, "http://nowhere.tosearch.url/beanmapping.xsd");
    assertNotNull(inputSource);
  }
View Full Code Here

    assertNotNull(inputSource);
  }

  @Test
  public void testResolveEntity_Direct() {
    InputSource inputSource = dozerResolver.resolveEntity(null, "beanmapping.xsd");
    assertNotNull(inputSource);
  }
View Full Code Here

                    ;
                    LocationResponseHandler handler=new LocationResponseHandler();
                    xr.setContentHandler(handler);
                    xr.setErrorHandler(handler);

                    xr.parse(new InputSource(connection.getInputStream()));
                    this.location=handler.loc;
                }
                catch(SAXException e) {
                    throw new RuntimeException("Unexpected error parsing ListAllMyBuckets xml", e);
                }
View Full Code Here

        return (T) new StAXSource(factory.createXMLStreamReader(getBinaryStream()));
      } catch (XMLStreamException e) {
        throw new SQLException(e);
      }
    } else if (sourceClass == SAXSource.class) {
      return (T) new SAXSource(new InputSource(getBinaryStream()));
    } else if (sourceClass == DOMSource.class) {
      try {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        DocumentBuilder docBuilder = dbf.newDocumentBuilder();
              Node doc = docBuilder.parse(new InputSource(getBinaryStream()));
              return (T) new DOMSource(doc);
      } catch (ParserConfigurationException e) {
        throw new SQLException(e);
      } catch (SAXException e) {
        throw new SQLException(e);
View Full Code Here

  }

  public InputSource resolveEntity(String publicId, String systemId) {
    byte[] temp = new byte[0];
    // strib...
    return new InputSource(new ByteArrayInputStream(temp));
  }
View Full Code Here

  protected static void parseNew(InputStream in, Channel ch, devplugin.Date day,
      Hashtable<String, MutableChannelDayProgram> ht, SweDBTvDataService dataService) throws Exception {
    SAXParserFactory fac = SAXParserFactory.newInstance();
    fac.setValidating(false);
    SAXParser sax = fac.newSAXParser();
    InputSource input = new InputSource(in);
    input.setSystemId(new File("/").toURI().toURL().toString());
    sax.parse(input, new DataHydraDayParser(ch, ht, dataService));
  }
View Full Code Here

            if (uri == null) {
                return;
            }
            is = uri.openStream();
            InputSource ip = new InputSource(is);
            ip.setSystemId(uri.toExternalForm());

            // Parse the web application deployment descriptor
            TreeNode webtld = null;
            // altDDName is the absolute path of the DD
            if (altDDName != null) {
View Full Code Here

  public void parse(Reader cfgReader, String cfgName) throws Exception {
    this.joramAdmName = cfgName;

    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser parser = factory.newSAXParser();
    parser.parse(new InputSource(cfgReader), this);
  }
View Full Code Here

    // Complete list of features of the xerces parser:
    // http://xml.apache.org/xerces2-j/features.html
    parser.setFeature("http://xml.org/sax/features/validation", false);
    parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);

    parser.parse(new InputSource(stream));
  }
View Full Code Here

TOP

Related Classes of org.xml.sax.InputSource

Copyright © 2018 www.massapicom. 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.