71squared/TBXML — pull request #17 by ws513 (2013-02-08 13:16:23+00:00)
Title: Bugfixes, removed 2 compiler warnings and code cleanup

- The methods "decodeData:" and "decodeData:withError:" now return an NSInteger in order to remove compiler warnings.

- "elementName:" now recalls "elementName:error:" in order to clean up the code and remove the crash in case "aXMLElement" is nil.

- "attributeName:" now recalls "attributeName:error:" in order to clean up the code and remove the crash in case "aXMLAttribute" is nil.

- "attributeValue:" now recalls "attributeValue:error:" in order to clean up the code and remove the crash in case "aXMLAttribute" is nil. Moreover a new error code has been added "D_TBXML_ATTRIBUTE_VALUE_IS_NIL" (with its related error description "Attribute value is nil"), in order to avoid a crash in case the value of an attribute is nil.

- "textForElement:" now recalls "textForElement:error:" in order to clean up the code and remove the crash in case "aXMLElement" is nil.

- "valueOfAttributeNamed:forElement:" now recalls "valueOfAttributeNamed:forElement:error:" in order to clean up the code and remove the crash in case "aName" or "aXMLElement" are nil. Moreover a compiler warning has been removed in this method.

- "childElementNamed:parentElement:" now recalls "childElementNamed:parentElement:error:" in order to clean up the code and remove the crash in case "aName" or "aParentXMLElement" are nil.

- "nextSiblingNamed:searchFromElement:" now recalls "nextSiblingNamed:searchFromElement:error:" in order to clean up the code and remove the crash in case "aName" or "aXMLElement" are nil.