Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.conversation.base
Class CpXmlParser

    java.lang.Object
      com.ibm.conversation.base.CpXmlParser

public class CpXmlParser
extends java.lang.Object

The CpXmlParser class is responsible for reading and parsing cpXML files, then initializing CpStateMachines to match the file contents.

This supports cpXML version "2.0".

Constructor Summary
`CpXmlParser()` Constructs a CpXmlParser object.

Method Summary
`java.lang.String` | `getCpXmlSchemaUri()` Returns the URI for the cpXML schema appropriate to this parser.
`java.lang.String` | `getCpXmlVersion()` Returns the cpXML version name appropriate to this parser.
`void` | `initCpStateMachine(CpStateMachine stateMachine)` Initializes the given CpStateMachine to match the cpXML file already read.
`void` | `loadDocument(java.lang.String uri)` Reads and parses the cpXML file at the given URI.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CpXmlParser

    public CpXmlParser()

  Constructs a CpXmlParser object.

Method Detail

### getCpXmlSchemaUri

    public java.lang.String getCpXmlSchemaUri()

  Returns the URI for the cpXML schema appropriate to this parser.

  Returns:
    The URI.

### getCpXmlVersion

    public java.lang.String getCpXmlVersion()

  Returns the cpXML version name appropriate to this parser.

  Returns:
    The version name.

### loadDocument

    public void loadDocument(java.lang.String uri)
                      throws org.xml.sax.SAXException,
                             java.io.IOException,
                             javax.xml.parsers.ParserConfigurationException

  Reads and parses the cpXML file at the given URI.

  This is the first of the two steps in initializing a CpStateMachine (`initCpStateMachine()` is the second). It uses a `DocumentBuilder` to read the URI and generate a Document object, which it stores for use when `initCpStateMachine()` is called.

  The URI is presumed to point to a cpXML file.

  Parameters:
    `uri` - The URI of the cpXML file.
  Throws:
    `org.xml.sax.SAXException` - If the the XML parser throws one.
    `java.io.IOException` - If the XML parser throws one.
    `javax.xml.parsers.ParserConfigurationException`

### initCpStateMachine

    public void initCpStateMachine(CpStateMachine stateMachine)

  Initializes the given CpStateMachine to match the cpXML file already read.

  This is the second of the two steps in initializing a CpStateMachine (`loadDocument()` is the first). It clears the state machine and configures it according to the contents of the Document object created and stored when `loadDocument()` was called.

  Parameters:
    `stateMachine` - The state machine to initialize.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005