• Post Reply Bookmark Topic Watch Topic
  • New Topic

parsing html document---problem

 
raghavendra gb
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am working on some project where i am parsing html document using HTMLEditorKit.Parser class of javax.swing.

PROBLEM :

I am unable to retrive the contents of script tag.

eg:
<html>
...

<script language="JavaScript1.2">
var highlightcolor="lightyellow"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
</script>

...
</html>

Contents:
var highlightcolor="lightyellow"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

are not displayed


kindly help me
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The contents of a SCRIPT tag are not HTML, in this case it is javascript, and are therefore ignored by HTML parsers.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!