Microsoft SDK for Java

createElement

The createElement method of the Document class contains the following signatures:

createElement(Element parent, int type, Name tag, String text)
createElement(int type, String tag)
createElement(int type)

createElement(Element parent, int type, Name tag, String text)

Creates a new element for the given element type and tag name using the ElementFactory for this Document. This method allows the Document class to be used as an ElementFactory itself.

Syntax

public final Element createElement(Element parent, int type, Name tag, String text);

Parameters

parent The parent element.
type The element type.
tag The element tag name.
text The element text.

createElement(int type, String tag)

Creates a new element for the given element type and tag name.

Syntax

public final Element createElement(int type, String tag);

Parameters

type The element type.
tag The element tag name.

createElement(int type)

Creates a new element for a given element type with a null tag name.

Syntax

public final Element createElement(int type);

Return Value

Returns the element created.

Parameters

type The element type.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.