com.ptc.windchill.enterprise.nativeapp.server
Class XMLUtility

java.lang.Object
  extended bycom.ptc.windchill.enterprise.nativeapp.server.XMLUtility

public class XMLUtility
extends Object

Common place for useful wrapperings of some xml parsing and creating for the application integration.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Constructor Summary
XMLUtility()
           
 
Method Summary
static HashMap getNameValues(Node node, String key, boolean noNulls)
          Take in an DOM document node and return the name/value pairs that are represented in a HashMap.
static Document parseXML(String xmlString)
          Take in a xml string and return a dom document.
static Document parseXMLFile(String filename)
          Take in an xml file and return a dom document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static boolean VERBOSE
Constructor Detail

XMLUtility

public XMLUtility()
Method Detail

parseXML

public static Document parseXML(String xmlString)
                         throws WTException
Take in a xml string and return a dom document.

Supported API: false

Parameters:
xmlString - XML string of data. Needs to be a complete document.
Returns:
Document
Throws:
WTException

parseXMLFile

public static Document parseXMLFile(String filename)
                             throws WTException
Take in an xml file and return a dom document.

Supported API: false

Parameters:
filename - Full pathname to file.
Returns:
Document
Throws:
WTException

getNameValues

public static HashMap getNameValues(Node node,
                                    String key,
                                    boolean noNulls)
Take in an DOM document node and return the name/value pairs that are represented in a HashMap.

Supported API: false

Parameters:
node -
key - String for extra attribute to look for.
noNulls - Flag to stop name value pairs where the value is null.
Returns:
HashMap