[英]Technique/class to clean invalid XML in AS3/Flex 4?
I'm looking for a way to load invalid (malformed) XML into an AS3 XML object. 我正在寻找一种将无效(格式错误)XML加载到AS3 XML对象中的方法。 Do you know a class or a technique to do so? 您知道这样做的课程或技巧吗? I have to load malformed HTML and parse it as XML. 我必须加载格式错误的HTML并将其解析为XML。
This is a Flex project so I can use Flex specific classes if needed! 这是一个Flex项目,因此如果需要,我可以使用Flex特定的类!
I thought of using the HTMLLoader since it accepts all kinds of malformed HTML and renders it properly but couldn't get anything to work... 我考虑使用HTMLLoader,因为它可以接受各种格式错误的HTML并正确呈现它,但无法正常工作...
Done! 做完了! Yet to be improved but quite fast and handy! 还有待提高,但相当快和方便!
Class is here: https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/util/air/HTMLFixer.as 类是在这里: https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/util/air/HTMLFixer.as
Enjoy. 请享用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.