Up

NSXMLElement class documentation

Authors

Generated by root

Software documentation for the NSXMLElement class

NSXMLElement : NSXMLNode

Declared in:
Foundation/NSXMLElement.h
Availability: OpenStep

Represents an XML element.

Instance Variables

Method summary

addAttribute: 

- (void) addAttribute: (NSXMLNode*)attribute;
Availability: OpenStep

Adds the supplied attribute to the receiver (ignoring if it has a duplicate name).

addChild: 

- (void) addChild: (NSXMLNode*)child;
Availability: OpenStep

Adds a child after existing children.

addNamespace: 

- (void) addNamespace: (NSXMLNode*)aNamespace;
Availability: OpenStep

Adds a namespace unless the name is a duplicate.

attributeForLocalName: URI: 

- (NSXMLNode*) attributeForLocalName: (NSString*)localName URI: (NSString*)URI;
Availability: OpenStep

Returns the attribute matching localName and URI.

attributeForName: 

- (NSXMLNode*) attributeForName: (NSString*)name;
Availability: OpenStep

Returns the named attribute.

attributes 

- (NSArray*) attributes;
Availability: OpenStep

Returns the receiver's attributes.

elementsForLocalName: URI: 

- (NSArray*) elementsForLocalName: (NSString*)localName URI: (NSString*)URI;
Availability: OpenStep

Searches for and returns all child elements which match localName and the specified URI.

elementsForName: 

- (NSArray*) elementsForName: (NSString*)name;
Availability: OpenStep

Searches for and returns all child elements which match name.

initWithName: 

- (id) initWithName: (NSString*)name;
Availability: OpenStep

Initialises the receiver with the given name.

initWithName: URI: 

- (id) initWithName: (NSString*)name URI: (NSString*)URI;
Availability: OpenStep

Initialises the receiver with the given name and namespace URI.

initWithName: stringValue: 

- (id) initWithName: (NSString*)name stringValue: (NSString*)string;
Availability: OpenStep

Initialises the receiver as a text node with the given name and content.

initWithXMLString: error: 

- (id) initWithXMLString: (NSString*)string error: (NSError**)error;
Availability: OpenStep

Initialises the receiver by parsing the XML string supplied.

insertChild: atIndex: 

- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index;
Availability: OpenStep

Inerts a child node.

insertChildren: atIndex: 

- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index;
Availability: OpenStep

Inserts a number of children.

namespaceForPrefix: 

- (NSXMLNode*) namespaceForPrefix: (NSString*)name;
Availability: OpenStep

Returns the namespace for the specified prefix in the receiver.

namespaces 

- (NSArray*) namespaces;
Availability: OpenStep

Returns the namespaces of the receiver.

normalizeAdjacentTextNodesPreservingCDATA: 

- (void) normalizeAdjacentTextNodesPreservingCDATA: (BOOL)preserve;
Availability: OpenStep

Merges adjacent text nodes. If a node's value is the empty string, and preserve is NO, it is removed.
This should be called with a value of NO before using XQuery or XPath.

removeAttributeForName: 

- (void) removeAttributeForName: (NSString*)name;
Availability: OpenStep

Removes the named attribute.

removeChildAtIndex: 

- (void) removeChildAtIndex: (NSUInteger)index;
Availability: OpenStep

Removes a child node.

removeNamespaceForPrefix: 

- (void) removeNamespaceForPrefix: (NSString*)name;
Availability: OpenStep

Removes a named namespace.

replaceChildAtIndex: withNode: 

- (void) replaceChildAtIndex: (NSUInteger)index withNode: (NSXMLNode*)node;
Availability: OpenStep

Replaces the child at the specified index.

resolveNamespaceForName: 

- (NSXMLNode*) resolveNamespaceForName: (NSString*)name;
Availability: OpenStep

Returns the namespace found by searching the chain of namespaces.

resolvePrefixForNamespaceURI: 

- (NSString*) resolvePrefixForNamespaceURI: (NSString*)namespaceURI;
Availability: OpenStep

Returns the URI by searching the chain of namespaces.

setAttributes: 

- (void) setAttributes: (NSArray*)attributes;
Availability: OpenStep

Sets the attributes of the receiver, ignoring all but the first of any duplicates.

setAttributesAsDictionary: 

- (void) setAttributesAsDictionary: (NSDictionary*)attributes;
Availability: OpenStep

Sets attributes from the supplkied dictionary.

setChildren: 

- (void) setChildren: (NSArray*)children;
Availability: OpenStep

Replaces all existing child nodes with those from the array.

setNamespaces: 

- (void) setNamespaces: (NSArray*)namespaces;
Availability: OpenStep

Sets the namespaces for the receiver, ignoring all but the first of any duplicates.



Instance Variables for NSXMLElement Class

_URI

@protected NSString* _URI;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_attributes

@protected NSMutableArray* _attributes;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_children

@protected NSArray* _children;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_childrenHaveMutated

@protected BOOL _childrenHaveMutated;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_name

@protected NSString* _name;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_namespaces

@protected NSMutableArray* _namespaces;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_prefixIndex

@protected NSInteger _prefixIndex;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.





Up