KissXML icon indicating copy to clipboard operation
KissXML copied to clipboard

no support for initWithData option NSXMLDocumentTidyXML

Open Daij-Djan opened this issue 13 years ago • 7 comments

actually there is no tidy support :) AFAIK

Daij-Djan avatar Jun 23 '12 18:06 Daij-Djan

i would 'fix this' by incorporating libtidy into KissXML -- but only if we build for iPhone

Daij-Djan avatar Jun 23 '12 19:06 Daij-Djan

#if TARGET_OS_IPHONE if (mask & DDXMLDocumentTidyHTML) { data = [[CTidy tidy] tidyData:data inputFormat:TidyFormat_HTML outputFormat:TidyFormat_XHTML diagnostics:NULL error:&theError]; } else if (mask & DDXMLDocumentTidyXML) { data = [[CTidy tidy] tidyData:data inputFormat:TidyFormat_XML outputFormat:TidyFormat_XML diagnostics:NULL error:&theError]; } #endif

Daij-Djan avatar Jun 23 '12 19:06 Daij-Djan

fixed in pull request

Daij-Djan avatar Jun 24 '12 11:06 Daij-Djan

Excuse me but i really can not understand the solution ! I'm a beginner and would be very grateful if you could explain what exactly should i do ? I really need to to fix this but i don't even understand the code... Thanks for your help!

Zer007 avatar Sep 03 '12 11:09 Zer007

hi, the KissXML has no tidy support and thus behaves differently than NSXMLDoc.... On OSX I therefore embedded CTidy

also I added the ability to falling to html parsing mode as this seems to be NSXMLDoc..'s way

Daij-Djan avatar Sep 03 '12 11:09 Daij-Djan

https://github.com/robbiehanson/KissXML/pull/18

Daij-Djan avatar Sep 03 '12 11:09 Daij-Djan

Thank you very much...

Zer007 avatar Sep 03 '12 12:09 Zer007