Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

META tag is getting added while parsing HTML

 
Srinivas Kothuri
Greenhorn
Posts: 19
  • 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
Posts: 21316
32
Eclipse IDE Firefox Browser MySQL Database
  • 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?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic