org.eclipse.higgins.icard.common.utils
Class XMLHelper

java.lang.Object
  extended by org.eclipse.higgins.icard.common.utils.XMLHelper

public class XMLHelper
extends Object

Used to help with common XML processing functions


Field Summary
static String DSIG_NS
           
static String HI_NS
           
static String IC_NS
           
static String MEX_NS
           
static String TRUST_NS
           
static String WSA_NS
           
static String WSAI_NS
           
static String XE_NS
           
 
Constructor Summary
XMLHelper()
           
 
Method Summary
static Element domFromFile(String strFileName)
           
static Element domFromStream(InputStream inputStream)
           
static void logElement(Element domElement)
           
static org.apache.axiom.om.OMElement omFromFile(String strFileName)
           
static org.apache.axiom.om.OMElement omFromStream(InputStream inputStream)
           
static String StripNamespaceDeclaration(String strElement)
           
static Element toDOM(org.apache.axiom.om.OMElement omElement)
          Converts an OMElement to an equivalent DOM Element
static Element toDOM(String strElement)
           
static org.eclipse.higgins.icard.io.IElement toElement(Element domElement)
          Converts an DOM Element to an equivalent Element
static org.eclipse.higgins.icard.io.IElement toElement(org.apache.axiom.om.OMElement omElement)
          Converts an OMElement to an equivalent IOElement
static org.apache.axiom.om.OMElement toOM(Element domElement)
          Converts an DOM Element into an equivalent OMElement
static org.apache.axiom.om.OMElement toOM(String strElement)
           
static String toString(Element domElement)
           
static String toString(org.apache.axiom.om.OMElement omElement)
          Converts an OMElement to an equivalent String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IC_NS

public static final String IC_NS
See Also:
Constant Field Values

TRUST_NS

public static final String TRUST_NS
See Also:
Constant Field Values

WSA_NS

public static final String WSA_NS
See Also:
Constant Field Values

MEX_NS

public static final String MEX_NS
See Also:
Constant Field Values

WSAI_NS

public static final String WSAI_NS
See Also:
Constant Field Values

DSIG_NS

public static final String DSIG_NS
See Also:
Constant Field Values

XE_NS

public static final String XE_NS
See Also:
Constant Field Values

HI_NS

public static final String HI_NS
See Also:
Constant Field Values
Constructor Detail

XMLHelper

public XMLHelper()
Method Detail

toElement

public static org.eclipse.higgins.icard.io.IElement toElement(org.apache.axiom.om.OMElement omElement)
                                                       throws Exception
Converts an OMElement to an equivalent IOElement

Parameters:
omElement - an OMElement to be converted into a IOElement
Returns:
the converted IOElement
Throws:
Exception

toElement

public static org.eclipse.higgins.icard.io.IElement toElement(Element domElement)
                                                       throws Exception
Converts an DOM Element to an equivalent Element

Parameters:
domElement - a DOM Element to be converted into a Element
Returns:
the converted Element
Throws:
Exception

toDOM

public static Element toDOM(org.apache.axiom.om.OMElement omElement)
                     throws Exception
Converts an OMElement to an equivalent DOM Element

Parameters:
omElement - an OMElement to be converted into a DOM Element
Returns:
the converted DOM Element
Throws:
Exception

toString

public static String toString(org.apache.axiom.om.OMElement omElement)
                       throws Exception
Converts an OMElement to an equivalent String

Parameters:
omElement - an OMElement to be converted into a String
Returns:
the converted a String
Throws:
Exception

StripNamespaceDeclaration

public static String StripNamespaceDeclaration(String strElement)

toOM

public static org.apache.axiom.om.OMElement toOM(Element domElement)
                                          throws Exception
Converts an DOM Element into an equivalent OMElement

Parameters:
domElement - an Element to be converted
Returns:
the converted DOM Element
Throws:
Exception

toString

public static String toString(Element domElement)
                       throws IOException
Throws:
IOException

logElement

public static void logElement(Element domElement)
                       throws IOException
Throws:
IOException

toDOM

public static Element toDOM(String strElement)
                     throws IOException,
                            Exception
Throws:
IOException
Exception

domFromStream

public static Element domFromStream(InputStream inputStream)
                             throws FileNotFoundException,
                                    Exception
Throws:
FileNotFoundException
Exception

domFromFile

public static Element domFromFile(String strFileName)
                           throws FileNotFoundException,
                                  Exception
Throws:
FileNotFoundException
Exception

omFromStream

public static org.apache.axiom.om.OMElement omFromStream(InputStream inputStream)
                                                  throws FileNotFoundException,
                                                         Exception
Throws:
FileNotFoundException
Exception

omFromFile

public static org.apache.axiom.om.OMElement omFromFile(String strFileName)
                                                throws FileNotFoundException,
                                                       Exception
Throws:
FileNotFoundException
Exception

toOM

public static org.apache.axiom.om.OMElement toOM(String strElement)
                                          throws Exception
Throws:
Exception