Download Stylus Studio - The World's Best XML Development Environment!


com.ddtek.jxtr
Class JXTRColInfo

java.lang.Object
  |
  +--com.ddtek.jxtr.JXTRColInfo

public class JXTRColInfo
extends java.lang.Object

JXTRColInfo implements methods that allow you to work with XML values in a result set returned from a jXTransformer query.

Different options are available to manage the resulting XML, depending on whether the generated XML needs to be retrieved as String, DOM, JDOM, SAX, or needs to be written to a java.io.Writer object.


Method Summary
 void dump(java.lang.String indent, java.io.Writer dumpTo)
          Dump internal structure.
 void generateSAX(org.xml.sax.XMLReader xmlReader)
          Generates XML SAX events that correspond to this column's XML value.
 java.sql.Clob getClob()
          Returns XML for this column as a CLOB object.
 org.w3c.dom.Document getDOM()
          Returns XML for this column as DOM document (default root element is added).
 void getDOM(org.w3c.dom.Node node)
          Returns XML for this column as a child DOM node of the specified DOM node.
 org.jdom.Document getJDOM()
          Returns XML for this column as JDOM document (default root element is added).
 void getJDOM(org.jdom.Element jdomElement)
          Returns XML for this column as a child JDOM node of the specified JDOM element node.
 java.lang.String getString()
          Returns XML for this column as a String.
 java.lang.String toString()
          Returns XML for this column as a String.
 void writeXML(java.io.Writer writer, java.lang.String encoding)
          Write XML for this column to the specified Writer using the requested encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

writeXML

public void writeXML(java.io.Writer writer,
                     java.lang.String encoding)
              throws JXTRException
Write XML for this column to the specified Writer using the requested encoding.

Parameters:
writer - writer object to which to write XML
encoding - encoding to use
Throws:
JXTRException

getClob

public java.sql.Clob getClob()
                      throws JXTRException
Returns XML for this column as a CLOB object.

Note that the jXTransformer API implements this feature by retrieving the complete XML document or fragment and caching it on the client side. This works for small- or medium-sized XML documents or fragments, but can result in scalability or performance problems with larger XML documents or fragments.

Returns:
created CLOB object for this column value
Throws:
JXTRException

toString

public java.lang.String toString()
Returns XML for this column as a String.

Overrides:
toString in class java.lang.Object
Returns:
String containing the XML document or fragment.
Throws:
JXTRException

getString

public java.lang.String getString()
                           throws JXTRException
Returns XML for this column as a String.

Returns:
String containing the XML document or fragment.
Throws:
JXTRException

getDOM

public org.w3c.dom.Document getDOM()
                            throws JXTRException
Returns XML for this column as DOM document (default root element is added).

Returns:
created DOM document for this column value
Throws:
JXTRException

getDOM

public void getDOM(org.w3c.dom.Node node)
            throws JXTRException
Returns XML for this column as a child DOM node of the specified DOM node.

Parameters:
node - DOM node under which the XML column value will be created.
Throws:
JXTRException

getJDOM

public org.jdom.Document getJDOM()
                          throws JXTRException
Returns XML for this column as JDOM document (default root element is added).

Returns:
created JDOM document for this column value
Throws:
JXTRException

getJDOM

public void getJDOM(org.jdom.Element jdomElement)
             throws JXTRException
Returns XML for this column as a child JDOM node of the specified JDOM element node.

Returns:
created JDOM document for this column value
Throws:
JXTRException

generateSAX

public void generateSAX(org.xml.sax.XMLReader xmlReader)
                 throws JXTRException
Generates XML SAX events that correspond to this column's XML value. The xmlReader must be an object of type JXTRSaxReader or the xmlReader features must be set as supported by JXTRSaxReader.

Throws:
JXTRException

dump

public void dump(java.lang.String indent,
                 java.io.Writer dumpTo)
          throws JXTRException
Dump internal structure. Troubleshooting purposes only!

JXTRException


Stylus Studio features SQL/XML tools for building XML views of relational data.