Question: Can I use JavaScript, or any other non-server script, to read a web page? I'd like my local HTML file (with JavaScript code) to read a internal web page, which is hosted on a web server, and get its entire source code. 

I tried XMLHttpRequest, but I am facing cross-domain issue. Any solution to this? Or any other non-server script that I can use? I already have a few JavaScript functions that I'd be using so want to use your suggested solution and my existing JavaScript code together.

Answer: 
I had right now the exactly same problem.

I success to solve it by using: `SomeStringVar.replaceAll("\\P{Print}","");`.

This command remove all the Unicode characters in the variant (characteres that you cant see- the strings look like equal, even they not really equal).

I use this command on each variant i needed in the equalization, and it works for me as well.
change the code to:

```
classname="edit_body"; //<- hardcode 

if(classname.equals("edit_body"))

```

if the code enters the if statement now, then there must obviously be some difference in the string content when you use the original "classname=el.getAttributeValue("class");".
in such case, loop over the individual characters and compare those to find the difference.

If the code still doesnt enter the if statement, either your code is not compiling and you are running old code, or your java installation is broken ;-)

OR.

if java is anything like .net (I don't know java)
is "el.getAttributeValue" typed as string?
if it is typed as object, then the if statement would not enter since those are two different instances of the same string.