NSXMLParser trouble
NSXMLParser trouble
- Subject: NSXMLParser trouble
- From: Alastair Houghton <email@hidden>
- Date: Mon, 27 Jun 2005 18:07:23 +0100
Hi all,
I've been trying to use NSXMLParser to write a tool (similar to
AppleGlot, which doesn't seem to be working properly for us) to merge
localised strings into the resources of a Cocoa app. It's *mostly*
working, but I've noticed that some strings aren't being read
correctly from the XML. An example of something that doesn't seem to
be working is:
<TextItem>
<Description>Some text: MORE TEXT (<=100) </Description>
<Position>MORE TEXT (<=100)</Position>
<TranslationSet>
...
</TranslationSet>
</TextItem>
(The format, for those that don't recognise it, is the same one that
AppleGlot uses; this is intentional.)
The problem I'm seeing is that the "<" isn't being converted into
the character it represents. This would be OK, *if* the NSXMLParser
left it in the data it passed to the delegate method -
parser:foundCharacters:, but I'm seeing two calls to the delegate
method, as follows:
-parser:<NSXMLParser *> foundCharacters:@"Some text: MORE TEXT ("
-parser:<NSXMLParser *> foundCharacters:@"=100)"
So when I hit the </Description> tag, the string I've been building
up looks like this:
"Some text: MORE TEXT (=100)"
instead of
"Some text: MORE TEXT (<=100)"
Has anyone else seen this problem, or anything similar?
I notice that the equivalent functionality in Core Foundation is
listed as "Currently not supported." Does this have any impact on
the Foundation NSXMLParser class?
Kind regards,
Alastair.
--
http://www.alastairs-place.net
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden