|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.portal.utils.xml.v1.XMLUtil
Class containing utility methods for parsing and manipulating XML documents.
| Constructor Summary | |
XMLUtil()
|
|
| Method Summary | |
static oracle.xml.parser.v2.XMLDocument |
applyXSL(oracle.xml.parser.v2.XMLDocument xmldoc,
oracle.xml.parser.v2.XSLStylesheet xsl,
java.io.OutputStream errOut)
Apply the given stylesheet to the given XML document, reporting errors and warnings to the given OutputStream. |
static java.lang.String |
escapeXML(java.lang.String text,
boolean isAttribute)
General utility to escape text for inclusion in XML. |
static java.lang.String |
escapeXMLAttribute(java.lang.String text)
Properly escapes text for inclusion in as XML attribute value. |
static java.lang.String |
escapeXMLText(java.lang.String text)
Properly escapes text for inclusion in as XML text. |
static boolean |
getBooleanValue(java.lang.String value)
Convert the given String encoding of a boolean value ( "true" or "false") to a boolean. |
static java.util.Enumeration |
getStyleSheetPIs(oracle.xml.parser.v2.XMLDocument doc)
Get an Enumeration of ProcessingInstructions from the given XML document which
have a target of "xml-stylesheet". |
static java.util.Enumeration |
getTargetPIs(oracle.xml.parser.v2.XMLDocument doc,
java.lang.String targetName)
Get an Enumeration of ProcessingInstructions from the given XML document which
have the specified target (for example, "xml-stylesheet"). |
static int |
getVersionMajor(java.lang.String version)
Given a version number string, get the integer corresponding to the 'major version'. |
static java.util.Enumeration |
getXslDocs(oracle.xml.parser.v2.XMLDocument doc)
Get an Enumeration of XSLStylesheets referenced by processing
instructions in the given XML document which have a target of
"xml-stylesheet". |
static oracle.xml.parser.v2.XMLDocument |
parseDocument(java.io.InputStream docInputStream,
java.io.OutputStream errOut)
Parse an XML document from the given InputStream, reporting
errors and warnings to the given OutputStream. |
static java.util.Hashtable |
parsePI(org.w3c.dom.ProcessingInstruction pi)
Given a ProcessingInstruction whose data contains
attribute/value pairs, return a Hashtable which contains
the attributes as keys and their corresponding values as values. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public XMLUtil()
| Method Detail |
public static oracle.xml.parser.v2.XMLDocument parseDocument(java.io.InputStream docInputStream,
java.io.OutputStream errOut)
throws java.io.IOException,
org.xml.sax.SAXException
InputStream, reporting
errors and warnings to the given OutputStream.docInputStream - InputStream from which the document
should be readerrOut - OutputStream to which parsing errors and
warnings should be reported
public static oracle.xml.parser.v2.XMLDocument applyXSL(oracle.xml.parser.v2.XMLDocument xmldoc,
oracle.xml.parser.v2.XSLStylesheet xsl,
java.io.OutputStream errOut)
throws java.io.IOException,
oracle.xml.parser.v2.XSLException
OutputStream.xmldoc - a parsed XML documentxsl - a parsed XSL stylesheeterrOut - OutputStream to which stylesheet processing
errors should be reported
public static java.util.Enumeration getTargetPIs(oracle.xml.parser.v2.XMLDocument doc,
java.lang.String targetName)
Enumeration of ProcessingInstructions from the given XML document which
have the specified target (for example, "xml-stylesheet").doc - the XML documenttargetName - the target of the processing instructions to be returnedEnumeration of ProcessingInstructions from the given XML document which
have the specified target.public static java.util.Enumeration getStyleSheetPIs(oracle.xml.parser.v2.XMLDocument doc)
Enumeration of ProcessingInstructions from the given XML document which
have a target of "xml-stylesheet".doc - the XML documentEnumeration of ProcessingInstructions from the given XML document which
have a target of "xml-stylesheet".
public static java.util.Enumeration getXslDocs(oracle.xml.parser.v2.XMLDocument doc)
throws java.io.IOException,
org.xml.sax.SAXException,
oracle.xml.parser.v2.XSLException
Enumeration of XSLStylesheets referenced by processing
instructions in the given XML document which have a target of
"xml-stylesheet".doc - the XML documentEnumeration of XSLStylesheets referenced by processing
instructions in the given XML document which have a target of
"xml-stylesheet".
public static java.util.Hashtable parsePI(org.w3c.dom.ProcessingInstruction pi)
throws org.xml.sax.SAXException
ProcessingInstruction whose data contains
attribute/value pairs, return a Hashtable which contains
the attributes as keys and their corresponding values as values.pi - a processing instructionHashtable mapping processing instruction attributes
to valuespublic static boolean getBooleanValue(java.lang.String value)
"true" or "false") to a boolean.value - String representation of a boolean valuetrue if the string is not null and
matches the string "true" in a case-insensitive comparisonpublic static int getVersionMajor(java.lang.String version)
"3.2.1" would return the integer 3.version - a version number string, e.g. "3.2.1"public static java.lang.String escapeXMLAttribute(java.lang.String text)
text - the String to escapepublic static java.lang.String escapeXMLText(java.lang.String text)
text - the String to escape
public static java.lang.String escapeXML(java.lang.String text,
boolean isAttribute)
text - the String to escapeisAttribute - indicates if the text should be escaped for inclusion
as an attributes value. If false then regular text is assumed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||