开发者

how to parse XML which contains data in Norwegian language?

how to parse XML which contains data in Norwegian language ?

Does i need any type of encoding with NSParser ?

Th开发者_StackOverflowanks.


I guess you are worried about non-ASCII characters in the XML file. Well you don't need to. The first line of an XML file should look something like:

<?xml version="1.0" encoding="UTF-8"?>

where the encoding attribute tells you which character set was used to encode the characters in the file. NSXMLParser will use that line to determine which character set it will use. Once it gets to your methods, all the text will be in NSStrings which will be able to cope with your Norwegian characters automatically.

All you need to be concerned about is that the file really is encoded in the character set that the first line says it is.


The xml is the language which don't concern which kind of language you are using!! In xml there should be one start tag and it's end tag. Then you can parse using xml parsing.

here is the tutorial to understand xml and here is the link to tutorial to parse the xml file.

may this will be help full to your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜