Converting html to xml. In our project html UI render automatically
and based on that ui we create xml it is possible to change xml in our
own style using (html which created dynamically)
note: 1.html not always well formed
2.In dynamic html how traverse the entire html tree bcoz we didnt know exact structure
3.using id i wont be traverse bcoz all are generated automatically.
任何人都会给出一个对我们非常有用的简单例子。
答案 0 :(得分:0)
听起来有人在做作业......
我会遍历dom 。你可以google那个。它将确保您的结果是有效的HTML并使其成为您不必编写任何类型的解析器。
这是一个旧的,虽然仍然有用的例子: http://www.permadi.com/tutorial/domTree/index.html