com.sapportals.wcm.util.html

Interface IHTMLElementStart

All Superinterfaces:
IHTMLElement

public interface IHTMLElementStart
extends IHTMLElement

Extends IHTMLElement to handle attributes.

This class extends IHTMLElement with the capabilities to handle element attributes which can appear in start elements.

It is possible to change the attributes of an element, to remove attributes and to add new ones. Note that namespace declarations will appear as normal attributes on an element. The name of an attribute is the Qualified Name . So it will include possible namespace prefixes.

Copyright (c) SAP AG 2001-2003


Method Summary
 void addAttribute(String name, String value)
          Add a new attribute with given name and value.
 int getIndexOf(String attributeName)
          Find the index of the attribute of given name or -1 .
 String getNameOf(int attributeIndex)
          Retrieve the name of the attribute with given index.
 int getNumberOfAttributes()
          Return the number of attributes this element has.
 String getValueOf(int attributeIndex)
          Retrieve the value of the attribute with given index.
 boolean isEmpty()
          Determines if this element is an empty element, e.g. ending with '/>'.
 void removeAttribute(int attributeIndex)
          Remove attribute with given index.
 void setValueOf(int attributeIndex, String value)
          Set the value of attribute with given index to a new value.
 
Methods inherited from interface com.sapportals.wcm.util.html.IHTMLElement
copyTo, getName, getNameLength, hasName, length, writeTo
 

Method Detail

isEmpty

public boolean isEmpty()
Determines if this element is an empty element, e.g. ending with '/>'. Note that an empty element can have attributes.

Returns:
if element is empty

getNumberOfAttributes

public int getNumberOfAttributes()
Return the number of attributes this element has.

Returns:
number of attributes

getIndexOf

public int getIndexOf(String attributeName)
Find the index of the attribute of given name or -1 .

Parameters:
attributeName - of attribute to find
Returns:
the index of attribute or -1 if not found

getNameOf

public String getNameOf(int attributeIndex)
Retrieve the name of the attribute with given index.

Parameters:
attributeIndex - of attribute
Returns:
name of attribute

getValueOf

public String getValueOf(int attributeIndex)
Retrieve the value of the attribute with given index. Note that the value of an attribute does not include surrounding quotes.

Parameters:
attributeIndex - of attribute
Returns:
value of attribute

setValueOf

public void setValueOf(int attributeIndex,
                       String value)
Set the value of attribute with given index to a new value.

Parameters:
attributeIndex - of attribute
value - new value

removeAttribute

public void removeAttribute(int attributeIndex)
Remove attribute with given index. Indexes of remaining attributes are recalculated.

Parameters:
attributeIndex - of attribute

addAttribute

public void addAttribute(String name,
                         String value)
                  throws HTMLException
Add a new attribute with given name and value.

Parameters:
name - of new attribute
value - of new attribute
Throws:
HTMLException - if attribute with same name already exists


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.