473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

java script error after transformation

I'm using ParseNeko to parse a html into a DOM; then after transforming the DOM into HTML again (using TransformFactory) I'm having a problem with javascript part. (the output is the same as the original except the javascript)

Expand|Select|Wrap|Line Numbers
  1. <SCRIPT language="JavaScript"><!--  function google_ad_request_done(google_ads) {  (...)  google_ad_client = 'ca-mcn_js'; // substitute your client_id     google_ad_channel = 'Singapore';     google_ad_output = 'js';     google_max_num_ads = '3';     //google_page_url = 'http://www.channelnewsasia.com/';     google_language = 'en';     google_encoding = 'latin1';     google_safe = 'high';     //google_adtest = 'on';     google_ad_section = 'default';  // --></SCRIPT>
  2.         <!-- End: Google ADS -->
Because it is a mess, after the comment sign // everything behind is considered comment as well.

Anyone know how to solve this problem??

Thanks a lot.
Oct 18 '07 #1
3 1035
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Remove the comments. That was only required for ancient browsers that no-one uses any more.
Oct 18 '07 #2
Welcome to TSDN!

Remove the comments. That was only required for ancient browsers that no-one uses any more.
Thanks a lot for the reply, but I'm not sure I catch what u mean (I'm totally new with transformation).

I got a suggestion to write a xslt to transform the DOM-->html, but I'm not sure how to remove the comment.
Oct 23 '07 #3
acoder
16,027 Expert Mod 8TB
By removing comments, I meant the starting and ending lines:
[HTML]<!--[/HTML] and [HTML]//-->[/HTML]If that doesn't solve the problem, post your code.
Oct 23 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Laura P | last post by:
Hi, I wasn't sure whether this should be posted in the Java are or in a Solaris thread, so I shall post it in both. Sorry for the duplication. I am new to Solaris and am having trouble...
0
by: Dominique Bejean | last post by:
Hello, I am having a problem doing an XSLT transformation using Java. I have a XML document as a DOM Document object, wrap the Document object with a DOMSource object, and do the...
4
by: TP | last post by:
Hi, I have reached a situation where I have to create small pieces of xml (around 8k characters) within my java app. Right now I am using stringbuffer to create the xml which does not go against...
1
by: Jens Mueller | last post by:
Hi there, this is a Java-XML Question, so I am not sure whether this is the right place, haven't found anything better .... I try to convert a Java object to XML via SAX and let the FOP...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
5
by: crazydiode | last post by:
HI All, I am new to XSLT. I am trying to use xslt with xml in my java code. I am basically trying to replace one node of the original xml with my own node. I defined the xslt as follows: ...
6
by: Lenny Wintfeld | last post by:
Hi I'm attempting additions/changes to a Java program that (among other things) uses XSLT to transform a large (96 Mb) XML file. It runs fine on small XML files but generates OutOfMemory...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.