2012-08-28 47 views
1

我想知道每個參數對於下面的委託方法是什麼值。XML解析器代表函數澄清

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict 

回答

1

didStartElement:的namespaceURI:的qualifiedName:屬性:

由解析器對象到其委託發送當它遇到給定元素的開始標籤。

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict 

參數

解析器

A parser object. 

的ElementName

A string that is the name of an element (in its start tag). 

的namespaceURI

If namespace processing is turned on, contains the URI for the current namespace as a string object. 

的qualifiedName

If namespace processing is turned on, contains the qualified name for the current namespace as a string object.. 

attributeDict

A dictionary that contains any attributes associated with the element. Keys are the names of attributes, and values are attribute values. 

獲取更多信息PLZ按照下面的鏈接: http://developer.apple.com/library/ios/#documentation/cocoa/reference/NSXMLParserDelegate_Protocol/Reference/Reference.html

+1

@iNeo:如果你是在懷疑是什麼命名空間,這裏是鏈接: http://www.w3schools.com/xml/xml_namespaces.asp – utsabiem

+0

@Pandey_Laxman:非常感謝您的詳細解釋。 – iNeo

+0

@iNeo很高興爲您提供幫助:) thx for up-vote –

0

瀏覽apple文檔。它包含了所有這些內容。請從link參考。