• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

META tag is getting added while parsing HTML

 
Srinivas Kothuri
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to read/write a simple HTML file using "javax.xml.parsers". I get all details(nodes and attributes) when i read that file as an XML document. After modifying some tag values, I write the changes to the same file using "javax.xml.transform". But, in between <head> ... </head> tags, "<META http-equiv="Content-Type" content="text/html; charset=UTF-8">" is getting added which fails the parser in my next attempt.

kindly tell me how can I avoid generation of this <META> tag . . .

Thank you in advance . . . .
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that's well-formed HTML. So if some parser is failing to parse it, then it's the fault of that parser. (Or were you trying to parse the HTML with an XML parser?)
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic