NSXMLParser get namespace prefix for attribute

Hhassan

New Member
I have an XML structure that looks like:\[code\]<Succeeded p1:type="Edm.Boolean" xmlns:p1="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices">false</Succeeded>\[/code\]Since I need to be able to get the \[code\]p1:type="Edm.Boolean"\[/code\] attribute and the namespace prefix may be different depending on several forces beyond my control. I need to figure out how to get the prefix from the namespace URI programmatically.I have implemented the \[code\]parser:didStartMappingPrefix:toURI:\[/code\] and \[code\]parser:didEndMappingPrefix:\[/code\] delegate methods, and though I have set \[code\]setShouldProcessNamespaces\[/code\] to YES, they do not get called.I am new to NSXMLParser, but not to iOS nor XML. Any direction on how I should go about this would be greatly appreciated.
 
Back
Top