Class XmlTransformer

  extended by net.objectlab.qalab.m2.util.XmlTransformer

public class XmlTransformer
extends java.lang.Object

A simple XML Transformer that is supplied with an XML file, an XSLT file and an output file.

Dave Sag.

Constructor Summary
XmlTransformer( anXml, anXslt, anOutput)
          Constructor that takes the xml and xslt input stream and output file.
Method Summary
 void addParameter(java.lang.String aKey, java.lang.String aValue)
          Add an optional XSLT parameter.
 void transform()
          Performs the XSLT transformation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public XmlTransformer( anXml,
Constructor that takes the xml and xslt input stream and output file.

anXml - The file containing well formed XML to be transformed.
anXslt - The file containing the XSLT that tranforms the XML.
anOutput - The file to write the outout to.
Method Detail


public final void addParameter(java.lang.String aKey,
                               java.lang.String aValue)
Add an optional XSLT parameter.

aKey - The key. a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name.
aValue - The value.


public final void transform()
                     throws javax.xml.transform.TransformerException
Performs the XSLT transformation.

javax.xml.transform.TransformerException - if anything went wrong.

Copyright © 2005-2006 ObjectLab Financial Ltd. All Rights Reserved.