Print Page as PDF
gov.va.med.xml.XmlUtilities ICR (5177)

gov.va.med.xml.XmlUtilities    ICR (5177)

Name Value
NUMBER 5177
IA # 5177
DATE CREATED 2008/04/11
CUSTODIAL PACKAGE FOUNDATIONS
USAGE Supported
TYPE Other
DBIC APPROVAL STATUS APPROVED
NAME gov.va.med.xml.XmlUtilities
GENERAL DESCRIPTION
public class XmlUtilities extends java.lang.Object:
Deprecated. Need for XML utilities has been superceded by the many
JRE-built-in and external XML frameworks.

This class contains a number of static utility methods to help developers work
with XML documents, nodes, attributes and strings.
STATUS Active
KEYWORDS
  • Foundations
  • FoundationsLib
  • xml
DURATION Till Otherwise Agreed
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
XML_HEADER
Deprecated. public static final java.lang.String
XML_HEADER: Represents the default header used for all xml documents that
communicate with an M server via VistALink. It is important to use this header
as keeps the client and M server in sync. Note that that as a String constant,
this value is compiled into the calling class at compile time; it is not
dynamically linked at runtime.
convertXmlToStr()
public static java.lang.String
convertXmlToStr(org.w3c.dom.Document doc) throws FoundationsException:

Deprecated. Need for XML utilities has been superceded by the many
JRE-built-in and external XML frameworks.

Converts a DOM document to a string.
VARIABLES TYPE VARIABLES DESCRIPTION
doc Input
org.w3c.dom.Document doc: document to convert.
return Output
returns java.lang.String: string conversion of DOM
document.
throws Output
Throws: FoundationsException
getNode()
public static org.w3c.dom.Node
getNode(java.lang.String xpathStr, org.w3c.dom.Node node): Deprecated. Need
for XML utilities has been superceded by the many JRE-built-in and external
XML frameworks

Returns the first node at the specified XPath location. Example:

This example returns the Customer/Address node in the specified document
object.

Node address = XmlUtilities.getNode("/Customer/Address", custDoc);
VARIABLES TYPE VARIABLES DESCRIPTION
xpathStr Input
java.lang.String xpathStr: xpath location
specification
node Input
org.w3c.dom.Node node: Node to search.
return Output
returns org.w3c.dom.Node: first node found.
getAttr()
public static org.w3c.dom.Attr
getAttr(org.w3c.dom.Node node, java.lang.String attrName): Deprecated. Need
for XML utilities has been superceded by the many JRE-built-in and external
XML frameworks.

Returns the Attribute with the given attrName at node. Example:

This example returns the 'state' attribute from the address node.

Attr state = getAttr(address,"state")
VARIABLES TYPE VARIABLES DESCRIPTION
node Input
org.w3c.dom.Node node: Node to search.
attrName Input
java.lang.String attrName: Name of the attribute to
find.
return Output
returns org.w3c.dom.Attr: attribute found.
getDocumentForXmlString()
public static org.w3c.dom.Document
getDocumentForXmlString(java.lang.String xml) throws FoundationsException:

Deprecated. Need for XML utilities has been superceded by the many
JRE-built-in and external XML frameworks.

Returns an XML DOM Document for the specified String. Example:

This example creates a customer XML document for a serialized customer:

Document cust = XmlUtilities.getDocumentForXmlString(custXmlString);
VARIABLES TYPE VARIABLES DESCRIPTION
xml Input
java.lang.String xml: serialized XML document.
return Output
returns org.w3c.dom.Document: XML document
throws Output
Throws: gov.va.med.exception.FoundationsException
getDocumentForXmlInputStream()
public static org.w3c.dom.Document
getDocumentForXmlInputStream(java.io.InputStream xml) throws
FoundationsException:

Deprecated. Need for XML utilities has been superceded by the many
JRE-built-in and external XML frameworks.

Returns an XML DOM Document for the specified InputStream Example:

This example creates a customer XML document from an input stream.

Document cust = XmlUtilities.getDocumentForXmlInputStream(custStream);
VARIABLES TYPE VARIABLES DESCRIPTION
xmlInput Input
java.io.InputStream xmlInput: input stream to be
processed.
return Output
returns org.w3c.dom.Document: XML document.
throws Output
Throws: gov.va.med.exception.FoundationsException
CREATOR CLARKE,KYLE E
DATE ACTIVATED 2008/07/11
DATE/TIME EDITED
DATE/TIME EDITED ACTION AT THE REQUEST OF
2009/12/16 10:42 APPROVED CLARKE,KYLE
Generated from AUG 12, 2020@ IA Listing Descriptions