ios官方文档( dom数据解析用到方法)

来源:互联网 发布:网络招嫖判刑多久 编辑:程序博客网 时间:2024/06/10 15:06

elementsForName:

Returns the child element nodes (as NSXMLElement objects) of the receiver that have a specified name.

返回子元素节点(如NSXMLElement对象)的接收方指定的名字

- (NSArray *)elementsForName:(NSString *)name
Parameters
name

A string specifying the name of the child element nodes to find and return. If name is a qualified name, then this method invokes elementsForLocalName:URI: with the URI parameter set to the URI associated with the prefix. Otherwise comparison is based on string equality of the qualified or non-qualified name.

一个字符串指定子元素节点的名称查找并返回。如果名称是一个合格的名称,那么这个方法调用elementsForLocalName:URI:URI参数设置为与前缀相关联的URI。否则比较是基于平等的合格或没有名称的字符串。
Return Value

An array of of NSXMLElement objects or an empty array if no matching children can be found.

rootElement

Returns the root element of the receiver.

- (NSXMLElement *)rootElement
Return Value

The root element of the receiver.

Availability
  • Available in OS X v10.4 and later.
See Also
  • – setRootElement:
Related Sample Code
  • Quartz Composer MiniSOAP
  • SimpleScriptingPlugin
Declared In
NSXMLDocument.h

stringValue

Returns the string assigned to the annotation.

- (NSString *)stringValue
Return Value

The string assigned to the annotation.

Availability
  • Available in OS X v10.4 and later.
See Also
  • – setStringValue:
Declared In
PDFAnnotationTextWidget.h

0 0
原创粉丝点击