org.encog.parse.tags.read

## Class ReadXML

- java.lang.Object
- - org.encog.parse.tags.read.ReadTags
  - - org.encog.parse.tags.read.ReadXML

-     public class ReadXML
      extends ReadTags

  This class is designed to read XML. It has several helper methods, beyond what the ReadTags class provides to assist in reading XML documents.
  Author:
    jheaton

- - ### Field Summary

    - ### Fields inherited from class org.encog.parse.tags.read.ReadTags

      `CHAR_BULLET, CHAR_TRADEMARK, MAX_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadXML(InputStream is)` Construct an XML reader.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `findTag(String name, boolean beginTag)` Advance until the specified tag is found.
    `int` | `readIntToTag()` Read an integer that is contained between the current position, and the next tag.
    `Map<String,String>` | `readPropertyBlock()` Read all property data until an end tag, which corrisponds to the current tag, is found.
    `String` | `readTextToTag()` Read all text between the current position and the next tag.

    - ### Methods inherited from class org.encog.parse.tags.read.ReadTags

      `eatWhitespace, getTag, is, parseAttributeName, parseString, parseTag, read, readToTag, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ReadXML

          public ReadXML(InputStream is)

      Construct an XML reader.
      Parameters:
        `is` - The input stream to read from.

  - ### Method Detail

    - #### findTag

          public boolean findTag(String name,
                        boolean beginTag)

      Advance until the specified tag is found.
      Parameters:
        `name` - The name of the tag we are looking for.
        `beginTag` - True if this is a begin tage, false otherwise.
      Returns:
        True if the tag was found.

    - #### readIntToTag

          public int readIntToTag()

      Read an integer that is contained between the current position, and the next tag.
      Returns:
        The integer that was found.

    - #### readPropertyBlock

          public Map<String,String> readPropertyBlock()

      Read all property data until an end tag, which corrisponds to the current tag, is found. The properties found will be returned in a map.
      Returns:
        The properties found.

    - #### readTextToTag

          public String readTextToTag()

      Read all text between the current position and the next tag.
      Returns:
        The string that was read.

Copyright © 2014. All Rights Reserved.