Open TangMonk opened 4 years ago
No, once the document is created, it cannot be changed anymore.
The you can use the transform function in xquery to create a new document (needs xquery_json in uses)
process(everydayHtmlString, ' x:transform(., function($node) { if ($node/self::table[@id="zhuye"]) then <table>aStringContainHTML</table> else $node } ) ');
@benibela how about add a setInnerHTML
method for Node? It is more convient
I am used Winform in C#, there is a libaray called Html Agility Pack, It is really convient and easy to use for parse a web page
I do not want people to believe they can change individual nodes. Then they might try multithreading, change different nodes in different threads and the program fails because you can only modify the entire document.
Every node has an index, first node might be 10, second node 20, third node 33, ...
If you add a node, it needs to update all the node indices afterwards.
Is it able to replace node innerHTML, like this:
and what is the proper way to update
everydayHtmlString
variable to the latest?