All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class hplb.xml.util.NormalizeHtml

java.lang.Object
   |
   +----hplb.xml.util.NormalizeHtml

public class NormalizeHtml
extends Object
Reads an HTML document on System.in, "normalizes" it in a couple of ways, and writes it to System.out. In the process HTML4.0 element names are converted to upper case, attribute names are converted to lower case, all attribute values gets enclosed in double quotes, all non-empty elements with an optional and omitted end tag are given an end tag.

Author:
Anders Kristensen

Constructor Index

 o NormalizeHtml()

Method Index

 o encodeText(String, boolean)
 o isHtmlElm(String)
 o main(String[])
 o print(Attribute, boolean)
 o print(Document)
 o print(Element)
 o print(Text)
 o printNode(Node)
 o usage()

Constructors

 o NormalizeHtml
 public NormalizeHtml()

Methods

 o usage
 public static void usage()
 o main
 public static void main(String args[]) throws Exception
 o print
 public static void print(Document doc)
 o printNode
 public static void printNode(Node node)
 o print
 public static void print(Text text)
 o print
 public static void print(Element elm)
 o print
 public static void print(Attribute attr,
                          boolean toLower)
 o encodeText
 public static String encodeText(String s,
                                 boolean attr)
 o isHtmlElm
 public static boolean isHtmlElm(String tagName)

All Packages  Class Hierarchy  This Package  Previous  Next  Index