edu.utexas.its.eis.tools.qwicap.template.xml.immutable
Class XMLString

java.lang.Object
  extended by edu.utexas.its.eis.tools.qwicap.template.xml.Markup
      extended by edu.utexas.its.eis.tools.qwicap.template.xml.immutable.ImmutableMarkup
          extended by edu.utexas.its.eis.tools.qwicap.template.xml.immutable.XMLString
All Implemented Interfaces:
Cloneable, Iterable<Range>

public class XMLString
extends ImmutableMarkup

XMLString creates a body of immutable markup from any String containing XML markup, provided that the string is well-formed, in the sense that for every "start" tag there is a corresponding "end" tag. Other than that, XMLString doesn't care what you feed to it, whether that be tiny fragments of XML, or entire documents.

Author:
Chris W. Johnson

Constructor Summary
XMLString(Object XMLStringProducer)
          Creates a body of immutable markup from any object whose toString method will produce a String of XML markup, whether that string is a well-formed fragment, or an entire XML document.
XMLString(Object XMLStringProducer, boolean ResolveNamespaces)
          Creates a body of immutable markup from any object whose toString method will produce a String of XML markup, whether that string is a well-formed fragment, or an entire XML document.
XMLString(String XStr)
          Creates a body of immutable markup from any String of XML markup, whether that string is a well-formed fragment, or an entire XML document.
XMLString(String XStr, boolean ResolveNamespaces)
          Creates a body of immutable markup from any String of XML markup, whether that string is a well-formed fragment, or an entire XML document.
 
Method Summary
 int length()
           
 
Methods inherited from class edu.utexas.its.eis.tools.qwicap.template.xml.immutable.ImmutableMarkup
clone, createMatch, getChangeCount, getCharacterSet, getCSSPatterns, getImmutable, getList, getMutable, toString, write
 
Methods inherited from class edu.utexas.its.eis.tools.qwicap.template.xml.Markup
checkHierarchy, enumerate, first, get, get, get, getCDATA, getComments, getDeclarations, getMarkupName, isEmpty, iterator, print, setMarkupName, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLString

public XMLString(Object XMLStringProducer)
          throws TagException
Creates a body of immutable markup from any object whose toString method will produce a String of XML markup, whether that string is a well-formed fragment, or an entire XML document.

Parameters:
XMLStringProducer - A string of XML, either a well-formed fragment, or an entire XML document.
Throws:
TagException - If there's a problem parsing the supplied string as XML, validating its tag hierarchy, or any number of related problems.

XMLString

public XMLString(String XStr)
          throws TagException
Creates a body of immutable markup from any String of XML markup, whether that string is a well-formed fragment, or an entire XML document.

Parameters:
XStr - A string of XML, either a well-formed fragment, or an entire XML document.
Throws:
TagException - If there's a problem parsing the supplied string as XML, validating its tag hierarchy, or any number of related problems.

XMLString

public XMLString(Object XMLStringProducer,
                 boolean ResolveNamespaces)
          throws TagException
Creates a body of immutable markup from any object whose toString method will produce a String of XML markup, whether that string is a well-formed fragment, or an entire XML document.

Parameters:
XMLStringProducer - A string of XML, either a well-formed fragment, or an entire XML document.
ResolveNamespaces - true if the namespaces of the elements in this fragment should be determined.
Throws:
TagException - If there's a problem parsing the supplied string as XML, validating its tag hierarchy, or any number of related problems.

XMLString

public XMLString(String XStr,
                 boolean ResolveNamespaces)
          throws TagException
Creates a body of immutable markup from any String of XML markup, whether that string is a well-formed fragment, or an entire XML document.

Parameters:
XStr - A string of XML, either a well-formed fragment, or an entire XML document.
ResolveNamespaces - true if the namespaces of the elements in this fragment should be determined.
Throws:
TagException - If there's a problem parsing the supplied string as XML, validating its tag hierarchy, or any number of related problems.
Method Detail

length

public int length()