| 149 |
149 |
| 150 if(!text || !text_len) |
150 if(!text || !text_len) |
| 151 return; |
151 return; |
| 152 |
152 |
| 153 xmlnode_insert_data(bconv->current, (const char*) text, text_len); |
153 xmlnode_insert_data(bconv->current, (const char*) text, text_len); |
| |
154 } |
| |
155 |
| |
156 static void |
| |
157 bonjour_parser_structured_error_handler(void *user_data, xmlErrorPtr error) |
| |
158 { |
| |
159 BonjourJabberConversation *bconv = user_data; |
| |
160 |
| |
161 purple_debug_error("jabber", "XML parser error for BonjourJabberConversation %p: " |
| |
162 "Domain %i, code %i, level %i: %s", |
| |
163 bconv, |
| |
164 error->domain, error->code, error->level, |
| |
165 (error->message ? error->message : "(null)\n")); |
| 154 } |
166 } |
| 155 |
167 |
| 156 static xmlSAXHandler bonjour_parser_libxml = { |
168 static xmlSAXHandler bonjour_parser_libxml = { |
| 157 NULL, /*internalSubset*/ |
169 NULL, /*internalSubset*/ |
| 158 NULL, /*isStandalone*/ |
170 NULL, /*isStandalone*/ |
| 183 NULL, /*externalSubset*/ |
195 NULL, /*externalSubset*/ |
| 184 XML_SAX2_MAGIC, /*initialized*/ |
196 XML_SAX2_MAGIC, /*initialized*/ |
| 185 NULL, /*_private*/ |
197 NULL, /*_private*/ |
| 186 bonjour_parser_element_start_libxml, /*startElementNs*/ |
198 bonjour_parser_element_start_libxml, /*startElementNs*/ |
| 187 bonjour_parser_element_end_libxml, /*endElementNs*/ |
199 bonjour_parser_element_end_libxml, /*endElementNs*/ |
| 188 NULL /*serror*/ |
200 bonjour_parser_structured_error_handler /*serror*/ |
| 189 }; |
201 }; |
| 190 |
202 |
| 191 void |
203 void |
| 192 bonjour_parser_setup(BonjourJabberConversation *bconv) |
204 bonjour_parser_setup(BonjourJabberConversation *bconv) |
| 193 { |
205 { |