Java Reference
In-Depth Information
Prototype 2: Code parsing and documentation . We will develop the
analysis and documentation component in the second phase. This module
will analyse Java source code and use the previous component to build the
Prototype 3: User interface . Finally, we will develop a graphical user inter-
face which provides user-friendly access to the application functionality.
Prototype 1: Intermediate representation
In the first phase we will develop a component that supports a structural
representation of HTML documents. This component must provide tools
methods to build, explore, modify and serialize representation of HTML
pages. The idea is to offer an easy to use object-oriented interface for
building and manipulating HTML content. This kind of facility is usually
called an “object model”.
An example of HTML that should be handled by the component is presented
in Figure 8.6. It contains an arbitrary selection of the most common tags
found in HTML pages on the internet, i.e.:
<HTML> and </HTML> delimit the entire document;
<HEAD><TITLE> and </TITLE></HEAD> delimit the document title;
<BODY> and </BODY> delimit the document body;
<H1> and </H1> delimit a first order titles;
<A HREF...> and </A> identify a link to another HTML document,
The structural representation shown in Figure 8.7 corresponds to the
object structure of the sample HTML document. This figure shows a UML
object diagram; the names of the objects have been defined in order to be
` HTML p
` HEAD pp` TITLE p Test ` /TITLE pp` /HEAD p
` BODY bgcolor # white p
` H1 p This is a test ` /H1 p
This is plain text
` A HREF # “” p
Click here...
` /A p
` /BODY p
` /HTML p
Figure 8.6 Sample HTML
Search WWH ::

Custom Search