MSBuild to update html tag -


here html file:

<!doctype html> <html> <head>  </head> <body>     <script id="scriptid" src=""></script> </body> </html> 

i want replace empty src script.js.

i tried xmlpoke, xpath query doesn't work think or maybe can't way:

<xmlpoke xmlinputpath="test.html"           query="/html/body/script[id='scriptid']/src"           value="script.js"/> 

thanks in advance me update src value.

attributes in xpath prefixed @.

/html/body/script[@id='scriptid']/@src 

you shouldn't using designed xml html 2 not same, @ best, if html well-formed, it'll strip out non-xml stuff doctype, @ worst it'll blow up.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -