com.sapportals.wcm.util.html

Interface IHTMLElement

All Known Subinterfaces:
IHTMLElementStart

public interface IHTMLElement

Represents a HTML tag for an event.

This class represents a HTML tag for element events during parsing. The element has the following properties:

Copyright (c) SAP AG 2001-2003


Method Summary
 int copyTo(char[] ch, int offset)
          Copy all characters of this element into the given buffer.
 String getName()
          Returns the element name.
 int getNameLength()
          Returns the length of the element name.
 boolean hasName(String name)
          Check if element has specified name.
 int length()
          Return the number of characters this element has.
 int writeTo(Writer writer)
          Copy the characters of this element onto the given Writer.
 

Method Detail

getName

public String getName()
Returns the element name. See hasName(String) for a cheaper method to compare names, if that is all you're interested in.

Returns:
the name of the element

getNameLength

public int getNameLength()
Returns the length of the element name.

Returns:
length of element name

hasName

public boolean hasName(String name)
Check if element has specified name. The check is done case-insensitiv.

Parameters:
name - to check against
Returns:
if element name equalsIgnoreCase the given name

copyTo

public int copyTo(char[] ch,
                  int offset)
Copy all characters of this element into the given buffer. Ensure that the buffer can keep length() chars.

Parameters:
ch - buffer to copy to
offset - where in the buffer to start
Returns:
number of characters copied

length

public int length()
Return the number of characters this element has.

Returns:
element length

writeTo

public int writeTo(Writer writer)
            throws IOException
Copy the characters of this element onto the given Writer.

Parameters:
writer - to write characters to
Returns:
number of characters written
Throws:
IOException - on failure from writer


Copyright 2006 SAP AG Complete Copyright Notice