org.apache.xml.utils

Class Hashtree2Node

public abstract class Hashtree2Node extends Object

Simple static utility to convert Hashtable to a Node. Please maintain JDK 1.1.x compatibility; no Collections!

Version: $Id: Hashtree2Node.java,v 1.6 2004/02/17 04:21:14 minchau Exp $

Author: shane_curcuru@us.ibm.com

See Also: EnvironmentCheck Extensions

UNKNOWN: general

Method Summary
static voidappendHashToNode(Hashtable hash, String name, Node container, Document factory)
Convert a Hashtable into a Node tree.

Method Detail

appendHashToNode

public static void appendHashToNode(Hashtable hash, String name, Node container, Document factory)
Convert a Hashtable into a Node tree.

The hash may have either Hashtables as values (in which case we recurse) or other values, in which case we print them as <item> elements, with a 'key' attribute with the value of the key, and the element contents as the value.

If args are null we simply return without doing anything. If we encounter an error, we will attempt to add an 'ERROR' Element with exception info; if that doesn't work we simply return without doing anything else byt printStackTrace().

Parameters: hash to get info from (may have sub-hashtables) name to use as parent element for appended node futurework could have namespace and prefix as well container Node to append our report to factory Document providing createElement, etc. services

Copyright © 2005 Apache XML Project. All Rights Reserved.