Package org.springframework.beans.factory.xml

Examples of org.springframework.beans.factory.xml.DefaultDocumentLoader


        return loadDocument(reader, resource.getDescription());
    }

    public static Document loadDocument(Reader reader, String description) {
        Document document = null;
        DefaultDocumentLoader loader = new DefaultDocumentLoader();
        try {
            InputSource inputSource = new InputSource(reader);
            document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
                    XmlBeanDefinitionReader.VALIDATION_NONE, true);
        }
        catch (Exception e) {
            throw new ExecutionException("Unable to load XML document from resource " + description, e);
        }
View Full Code Here


              + encodedResource.getResource(), e);
    }

    Document document = null;

    DefaultDocumentLoader loader = new DefaultDocumentLoader();
    try {
      InputSource inputSource = new InputSource(inputStream);
      inputSource.setEncoding(encodedResource.getEncoding());
      document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
          XmlBeanDefinitionReader.VALIDATION_NONE, false);
    }
    catch (Exception e) {
      throw new ConfigurationException("Unable to load XML module definition document from resource "
          + encodedResource.getResource(), e);
View Full Code Here

        return loadDocument(reader, resource.getDescription());
    }

    public static Document loadDocument(Reader reader, String description) {
        Document document = null;
        DefaultDocumentLoader loader = new DefaultDocumentLoader();
        try {
            InputSource inputSource = new InputSource(reader);
            document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
                    XmlBeanDefinitionReader.VALIDATION_NONE, false);
        }
        catch (Exception e) {
            throw new ExecutionException("Unable to load XML document from resource " + description, e);
        }
View Full Code Here

        return loadDocument(reader, resource.getDescription());
    }

    public static Document loadDocument(Reader reader, String description) {
        Document document = null;
        DefaultDocumentLoader loader = new DefaultDocumentLoader();
        try {
            InputSource inputSource = new InputSource(reader);
            document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
                    XmlBeanDefinitionReader.VALIDATION_NONE, true);
        }
        catch (Exception e) {
            throw new ExecutionException("Unable to load XML document from resource " + description, e);
        }
View Full Code Here

    return loadDocument(reader, resource.getDescription());
  }

  public static Document loadDocument(Reader reader, String description) {
    Document document = null;
    DefaultDocumentLoader loader = new DefaultDocumentLoader();
    try {
      InputSource inputSource = new InputSource(reader);
      document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
          XmlBeanDefinitionReader.VALIDATION_NONE, false);
    }
    catch (Exception e) {
      throw new ExecutionException("Unable to load XML document from resource " + description, e);
    }
View Full Code Here

              + encodedResource.getResource(), e);
    }

    Document document = null;

    DefaultDocumentLoader loader = new DefaultDocumentLoader();
    try {
      InputSource inputSource = new InputSource(inputStream);
      inputSource.setEncoding(encodedResource.getEncoding());
      document = loader.loadDocument(inputSource, null, new SimpleSaxErrorHandler(logger),
          XmlBeanDefinitionReader.VALIDATION_NONE, false);
    }
    catch (Exception e) {
      throw new ConfigurationException("Unable to load XML module definition document from resource "
          + encodedResource.getResource(), e);
View Full Code Here

    // no file found, return null to continue the discovery process
    if (!m2Settings.exists())
      return null;

    try {
      DocumentLoader docLoader = new DefaultDocumentLoader();
      Document document = docLoader.loadDocument(new InputSource(m2Settings.getInputStream()), null, null,
        XmlValidationModeDetector.VALIDATION_NONE, false);

      return (DomUtils.getChildElementValueByTagName(document.getDocumentElement(), LOCAL_REPOSITORY_ELEM));
    }
    catch (Exception ex) {
View Full Code Here

   *
   * @return a <tt>pom.xml</tt> <tt>groupId</tt>.
   */
  String getGroupIdFromPom(Resource pomXml) {
    try {
      DocumentLoader docLoader = new DefaultDocumentLoader();
      Document document = docLoader.loadDocument(new InputSource(pomXml.getInputStream()), null, null,
        XmlValidationModeDetector.VALIDATION_NONE, false);

      String groupId = DomUtils.getChildElementValueByTagName(document.getDocumentElement(), GROUP_ID_ELEM);
      // no groupId specified, try the parent definition
      if (groupId == null) {
View Full Code Here

   *
   * @return a <tt>pom.xml</tt> <tt>groupId</tt>.
   */
  String getGroupIdFromPom(Resource pomXml) {
    try {
      DocumentLoader docLoader = new DefaultDocumentLoader();
      Document document = docLoader.loadDocument(new InputSource(pomXml.getInputStream()), null, null,
        XmlValidationModeDetector.VALIDATION_NONE, false);

      String groupId = DomUtils.getChildElementValueByTagName(document.getDocumentElement(), GROUP_ID_ELEM);
      // no groupId specified, try the parent definition
      if (groupId == null) {
View Full Code Here

    // no file found, return null to continue the discovery process
    if (!m2Settings.exists())
      return null;

    try {
      DocumentLoader docLoader = new DefaultDocumentLoader();
      Document document = docLoader.loadDocument(new InputSource(m2Settings.getInputStream()), null, null,
        XmlValidationModeDetector.VALIDATION_NONE, false);

      return (DomUtils.getChildElementValueByTagName(document.getDocumentElement(), LOCAL_REPOSITORY_ELEM));
    }
    catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.xml.DefaultDocumentLoader

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.