aspose file tools*
The moose likes XML and Related Technologies and the fly likes META tag is getting added while parsing HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "META tag is getting added while parsing HTML" Watch "META tag is getting added while parsing HTML" New topic
Author

META tag is getting added while parsing HTML

Srinivas Kothuri
Greenhorn

Joined: Feb 08, 2010
Posts: 16
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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?)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: META tag is getting added while parsing HTML