Package org.codehaus.plexus.util.xml

Examples of org.codehaus.plexus.util.xml.XmlStreamReader


     * @see XmlStreamReader
     */
    public static XmlStreamReader newXmlReader( File file )
    throws IOException
    {
        return new XmlStreamReader( file );
    }
View Full Code Here


     * @see XmlStreamReader
     */
    public static XmlStreamReader newXmlReader( URL url )
    throws IOException
    {
        return new XmlStreamReader( url );
    }
View Full Code Here

    {
        configurator = getContainer().lookup( ComponentConfigurator.class, "basic" );

        InputStream is = getClass().getResourceAsStream( "/" + getPluginDescriptorLocation() );

        XmlStreamReader reader = ReaderFactory.newXmlReader( is );

        InterpolationFilterReader interpolationFilterReader =
            new InterpolationFilterReader( new BufferedReader( reader ), container.getContext().getContextData() );

        PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build( interpolationFilterReader );
View Full Code Here

        if (nextEntry == null || nextEntry.isDirectory()) {
          continue;
        }
        final String name = nextEntry.getName();
        if (name.equals("META-INF/tobago-theme.xml") || name.equals("META-INF/tobago-config.xml")) {
          XmlStreamReader xsr = null;
          try {
            final StringWriter stringWriter = new StringWriter();
            xsr = ReaderFactory.newXmlReader(zip.getInputStream(nextEntry));
            IOUtil.copy(xsr, stringWriter);
            return stringWriter.toString();
View Full Code Here

  }

  private static Map<String, String> parse(final InputStream in) {
    try {
      final Map<String, String> locations = Maps.newHashMap();
      final Xpp3Dom dom = Xpp3DomBuilder.build(new XmlStreamReader(in));

      for (final Xpp3Dom data : dom.getChildren("data")) {
        final Xpp3Dom location = data.getChild("location");
        final String type = data.getAttribute("type");
        final String href = location.getAttribute("href");
View Full Code Here

  private static Xpp3Dom parseXmlItem(final StorageFileItem item)
      throws IOException, XmlPullParserException
  {
    try (InputStream is = item.getInputStream()) {
      return Xpp3DomBuilder.build(new XmlStreamReader(is));
    }
  }
View Full Code Here

          final ZipEntry ze = z.getEntry(jarPath);
          if (ze == null) {
            throw new LocalStorageException("Corrupted P2 metadata jar " + jarPath);
          }
          try (InputStream zis = z.getInputStream(ze)) {
            return Xpp3DomBuilder.build(new XmlStreamReader(zis));
          }
        }
      }
    }
    finally {
View Full Code Here

  private Xpp3Dom loadXpp3Dom(final String filepath)
      throws IOException, XmlPullParserException
  {
    try (FileInputStream is = new FileInputStream(new File("src/test/resources", filepath))) {
      return Xpp3DomBuilder.build(new XmlStreamReader(is));
    }
  }
View Full Code Here

  private Xpp3Dom getMirrorsDom(final StorageFileItem mirrorsItem)
      throws IOException, XmlPullParserException
  {
    try (InputStream is = mirrorsItem.getInputStream()) {
      return Xpp3DomBuilder.build(new XmlStreamReader(is));
    }
  }
View Full Code Here

    final Map<String, ArtifactMapping> tempRemoteArtifactMappings = new LinkedHashMap<String, ArtifactMapping>();
    final Map<String, String> tempMirrorsURLsByRepositoryURL = new LinkedHashMap<String, String>();
    Xpp3Dom dom;
    try {
      dom = Xpp3DomBuilder.build(new XmlStreamReader(artifactMappingsItem.getInputStream()));
    }
    catch (final IOException e) {
      throw new LocalStorageException("Could not load artifact mappings", e);
    }
    catch (final XmlPullParserException e) {
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.util.xml.XmlStreamReader

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.