解析XML是停止的,因为在XML中有特殊符号(')

时间:2015-02-10 13:26:26

标签: xml swift

我有xml

<script type="text/javascript" src="/bitrix/js/main/core/core.js?1302607145"></script>
<script type="text/javascript">BX.message({'LANGUAGE_ID':'ru','FORMAT_DATE':'DD.MM.YYYY','FORMAT_DATETIME':'DD.MM.YYYY HH:MI:SS','COOKIE_PREFIX':'BITRIX_SM'})</script>
<script type="text/javascript" src="/bitrix/js/main/core/core_ajax.js?1302607147"></script>
<script type="text/javascript" src="/bitrix/js/main/session.js?1302607142"></script>
<script type="text/javascript">
bxSession.Expand(86400, 'fe05ffe85fe71cfbda890bd6e53822c9', false, 'a0a1120039d68a6bdfc189342fcbcb3a');
</script>

我解析了这个XML

func parser(parser: NSXMLParser!, didStartElement elementName: String!, namespaceURI: String!, qualifiedName qName: String!, attributes attributeDict: [NSObject : AnyObject]!) {

    html = elementName }

并解析停止因为找到'符号。怎么更换这个?

0 个答案:

没有答案