Main Page | Class Hierarchy | Class List | Class Members

kddml.Utils.XMLUtility Class Reference

List of all members.

Public Member Functions

String toString ()

Static Public Member Functions

static Vector< Node > getChildren (Node nodo)
static boolean hasChildren (Node padre)
static int getNumOfChildren (Node padre)
static Node getChild (Node padre, int i)
static Node getFirstChild (Node padre)
static Node getLastChild (Node padre)
static void setAttribute (Element elem, String attribute_name, String attribute_value)
static String getAttribute (Element elem, String attribute_name)
static Document parse (InputStream input, String dtd_path, String doc_type) throws DOMParserException
static Document parse (File input) throws DOMParserException
static Document parse (String input, boolean parse_dtd) throws DOMParserException
static String toString (Node node)
static boolean toFile (String path, Document doc)
static Element clone (Node node)
static Document initializeDocument (String root)
static boolean formatting (String file_xml, String file_xsl, String file_html, String[] formal_params, String[] actual_params) throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerException, java.io.FileNotFoundException

Static Public Attributes

static Document doc

Detailed Description

XML parser utility. It uses the DOM stategy.

Title: KDDML

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003-2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)
Version:
2.0.16


Member Function Documentation

static Vector<Node> kddml.Utils.XMLUtility.getChildren Node  nodo  )  [static]
 

Returns all children of a given node.

Parameters:
nodo Node
Returns:
Vector the list of children as Node.

static boolean kddml.Utils.XMLUtility.hasChildren Node  padre  )  [static]
 

Returns true if a node has at least a child.

Parameters:
padre Node
Returns:
boolean

static int kddml.Utils.XMLUtility.getNumOfChildren Node  padre  )  [static]
 

Returns the number of children of a given node.

Parameters:
padre Node
Returns:
int

static Node kddml.Utils.XMLUtility.getChild Node  padre,
int  i
[static]
 

Returns the i-esim child of a given node. Return null if the child do not exist.

Parameters:
padre Node
i int
Returns:
Node

static Node kddml.Utils.XMLUtility.getFirstChild Node  padre  )  [static]
 

Returns the first child of a given node. Returns null if the node do not have children.

Parameters:
padre Node
Returns:
Node

static Node kddml.Utils.XMLUtility.getLastChild Node  padre  )  [static]
 

Returns the last child of a given node. Returns null if the node do not have children.

Parameters:
padre Node
Returns:
Node

static void kddml.Utils.XMLUtility.setAttribute Element  elem,
String  attribute_name,
String  attribute_value
[static]
 

Set the attribute to the input XML element. Replace every '<' with '<' in attribute value Replace every '>' with '>' in attribute value Replace every '&' with '&' Replace every ''' with ''' Replace every '"' with '"'

Parameters:
elem Element
attribute_name String
attribute_value String

static String kddml.Utils.XMLUtility.getAttribute Element  elem,
String  attribute_name
[static]
 

Returns the attribute value of the input XML elemente. Replace every '<' with '<' in attribute value Replace every '>' with '>' in attribute value Replace every '&' with '&' Replace every ''' with ''' Replace every '"' with '"'

Parameters:
elem Element
attribute_name String
Returns:
String

static Document kddml.Utils.XMLUtility.parse InputStream  input,
String  dtd_path,
String  doc_type
throws DOMParserException [static]
 

XML parsing. Returns a DOM object. Throws an exception if an error occurs.

Parameters:
input InputStream
dtd_path String the DTD path. Can be null if DTD is not needed.
doc_type String the doc type. Can be null if DTD is not needed.
Exceptions:
DOMParserException 
Returns:
Document

static Document kddml.Utils.XMLUtility.parse File  input  )  throws DOMParserException [static]
 

XML Parser. Returns a DOM object. Throws an exception if an error occurs.

Parameters:
input File
Returns:
Document
Exceptions:
DOMParserException 

static Document kddml.Utils.XMLUtility.parse String  input,
boolean  parse_dtd
throws DOMParserException [static]
 

XML Parser. Returns a DOM object. Throws an exception if an error occurs.

Parameters:
input String
parse_dtd boolean
Returns:
Document
Exceptions:
DOMParserException 

String kddml.Utils.XMLUtility.toString  ) 
 

Print the document.

Returns:
String

static String kddml.Utils.XMLUtility.toString Node  node  )  [static]
 

Returns a representation of the input node as string.

Parameters:
node Node
Returns:
String

static boolean kddml.Utils.XMLUtility.toFile String  path,
Document  doc
[static]
 

Saves the input document in the specified path. Returns false if the document cannot be saved.

Parameters:
path String
doc Document
Returns:
boolean

static Element kddml.Utils.XMLUtility.clone Node  node  )  [static]
 

Cloning of input node. This method is used to append to a document an XML node that belong to another DOM tree.

Parameters:
node Node
Returns:
Element

static Document kddml.Utils.XMLUtility.initializeDocument String  root  )  [static]
 

Method used to initialize the XML document.

Parameters:
root String
Returns:
Document

static boolean kddml.Utils.XMLUtility.formatting String  file_xml,
String  file_xsl,
String  file_html,
String[]  formal_params,
String[]  actual_params
throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerException, java.io.FileNotFoundException [static]
 

Formatting of input xml document. XML --> HTML translator.

Parameters:
file_xml String
file_xsl String
file_html String
formal_params String[]
actual_params String[]
Exceptions:
TransformerConfigurationException 
TransformerException 
FileNotFoundException 
Returns:
boolean


Member Data Documentation

Document kddml.Utils.XMLUtility.doc [static]
 

DOM document.


Generated on Thu Feb 23 13:04:56 2006 for kddml by  doxygen 1.4.3