Examples of XMLReader


Examples of com.sun.syndication.io.XmlReader

    public void run() {
      try {
        SyndFeed feed = null;
        SyndFeedInput input = new SyndFeedInput();
        feed = input.build(new XmlReader(new URL(feedUrl)));
        rssTitle = feed.getTitle();
      } catch (Exception e) {
        logger.debug(e);
      }
View Full Code Here

Examples of de.willuhn.datasource.serialize.XmlReader

        Reader reader = null;
        try
        {
          InputStream is = new BufferedInputStream(new FileInputStream(file));
          reader = new XmlReader(is,new ObjectFactory() {
         
            public GenericObject create(String type, String id, Map values) throws Exception
            {
              AbstractDBObject object = (AbstractDBObject) Settings.getDBService().createObject(loader.loadClass(type),null);
              object.setID(id);
View Full Code Here

Examples of diva.util.xml.XmlReader

            String xmlout;

            public void init() throws Exception {
                url = new URL("file:/java/diva/util/test/xml1.xml"); //FIXME
                document = new XmlDocument(url);
                reader = new XmlReader();
                writer = new XmlWriter();
            }

            public void run() throws Exception {
                reader.parse(document);
View Full Code Here

Examples of edu.udo.cs.wvtool.external.XmlReader

    private int pos;

    public TagIgnoringReader(Reader reader) throws IOException {
        super();
        this.reader = reader;
        xr = new XmlReader(reader);
        xr.relaxed = true;
        xr.defineCharacterEntity("auml", "\u00E4");
        xr.defineCharacterEntity("ouml", "\u00F6");
        xr.defineCharacterEntity("uuml", "\u00FC");
        xr.defineCharacterEntity("Auml", "\u00C4");
View Full Code Here

Examples of fi.luomus.commons.xml.XMLReader

        } catch (URISyntaxException e) {
            throw new RuntimeException("Malformed URI", e);
        }

        try {
            String rootNodeName = new XMLReader().parse(document).getRootNode().getName();
            if (!rootNodeName.equals("SimpleDarwinRecordSet")) {
                return null;
            }
            return document;
        } catch (IllegalArgumentException ex) {
View Full Code Here

Examples of getfacts.plugins.XmlReader

                    else if( items.getPluginName().compareTo("getfacts.plugins.XmlReader")== 0 )
                    {
                        FetcherInterface plugin = plugins.get(items);
                        if( plugin == null )
                        {
                            plugin = new XmlReader();
                            plugins.put(items, plugin);
                        }

                        try
                        {
View Full Code Here

Examples of org.apache.archiva.xml.XMLReader

     *
     */
    public static MavenRepositoryMetadata read( File metadataFile )
        throws XMLException
    {
        XMLReader xml = new XMLReader( "metadata", metadataFile );
        // invoke this to remove namespaces, see MRM-1136
        xml.removeNamespaces();

        MavenRepositoryMetadata metadata = new MavenRepositoryMetadata();

        metadata.setGroupId( xml.getElementText( "//metadata/groupId" ) );
        metadata.setArtifactId( xml.getElementText( "//metadata/artifactId" ) );
        metadata.setVersion( xml.getElementText( "//metadata/version" ) );

        metadata.setLastUpdated( xml.getElementText( "//metadata/versioning/lastUpdated" ) );
        metadata.setLatestVersion( xml.getElementText( "//metadata/versioning/latest" ) );
        metadata.setReleasedVersion( xml.getElementText( "//metadata/versioning/release" ) );
        metadata.setAvailableVersions( xml.getElementListText( "//metadata/versioning/versions/version" ) );

        Element snapshotElem = xml.getElement( "//metadata/versioning/snapshot" );
        if ( snapshotElem != null )
        {
            MavenRepositoryMetadata.Snapshot snapshot = new MavenRepositoryMetadata.Snapshot();
            snapshot.setTimestamp( snapshotElem.elementTextTrim( "timestamp" ) );
            String tmp = snapshotElem.elementTextTrim( "buildNumber" );
            if ( NumberUtils.isNumber( tmp ) )
            {
                snapshot.setBuildNumber( NumberUtils.toInt( tmp ) );
            }
            metadata.setSnapshotVersion( snapshot );
        }

        for ( Element plugin : xml.getElementList( "//metadata/plugins/plugin" ) )
        {
            MavenRepositoryMetadata.Plugin p = new MavenRepositoryMetadata.Plugin();
            p.setPrefix( plugin.elementTextTrim( "prefix" ) );
            p.setArtifactId( plugin.elementTextTrim( "artifactId" ) );
            p.setName( plugin.elementTextTrim( "name" ) );
View Full Code Here

Examples of org.apache.maven.archiva.xml.XMLReader

        }

        boolean configOk = false;
        try
        {
            XMLReader xml = new XMLReader( "configuration", userConfigFile );
            String configVersion = xml.getElementText( "//configuration/version" );
            if ( StringUtils.isNotBlank( configVersion ) )
            {
                configOk = true;

                // Found an embedded configuration version.
View Full Code Here

Examples of org.apache.wicket.util.io.XmlReader

  {
    Args.notNull(inputStream, "inputStream");

    try
    {
      XmlReader xmlReader = new XmlReader(new BufferedInputStream(inputStream, 4000),
        encoding);
      this.input = new FullyBufferedReader(xmlReader);
      this.encoding = xmlReader.getEncoding();
    }
    finally
    {
      IOUtils.closeQuietly(inputStream);
    }
View Full Code Here

Examples of org.bifrost.xmlio.XmlReader

   * Test reading from a file that does not exist.  Make sure the file
   * <code>/foobardpath/foobarfile.xml</code> does not exist.
   */
  public void testInvalidFile()
  {
    XmlReader config = null;
    try
    {
      String packageName = nameOfPackage(this.getClass().getName());
      config = new XmlReader("/foobardpath/foobarfile.xml", packageName);
      assertNotNull(config);
    }
    catch (XmlException e)
    {
      String test = e.toString().toLowerCase();
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.