Forums Register Login

illegal escape charcter error

+Pie Number of slices to send: Send
hi all

please check the following code as illegal escape character.urgent please
+Pie Number of slices to send: Send
The backslash \ character in string literals is the escape character. It allows you to write for example \n for a newline, \t for a tab etc.

If you write "C:\Documents and Settings\JA0084604\Desktop\test1a.xml" then Java is going to complain that \D and \J are illegal escape sequences. If you want to include a literal backslash in your string, you have to write \\ (two backslashes).

So, change the string to: "C:\\Documents and Settings\\JA0084604\\Desktop\\test1a.xml"

Please UseCodeTags when you post source code. Also, please EaseUp.
+Pie Number of slices to send: Send
thanks alot. i am suffering with since 1 hr.i changed as like that but for only c i did remaining i didnt.

if you know xmldiff classe let me know please.its urgent to me
+Pie Number of slices to send: Send
 

jyothsna ananthula wrote:thanks alot.


Where did you see an Alot?

i am suffering with since 1 hr.i changed as like that but for only c i did remaining i didnt.


Please UseRealWords: "hour" and "see" (I think) instead of "hr" and "c".

its urgent to me


Please EaseUp.
+Pie Number of slices to send: Send
In the following code i am getting error at a.setDocuments(xmlDocument1,xmlDocument2); cann't find symbol xmlDocument1 and xmlDocument2




any body help me out please.
+Pie Number of slices to send: Send
I added code tags to your post to make it more legible. Next time, just highlight your code and click the little "code" button above - just like you wanted to make something italic or bold (but don't make your code italic or bold...)

To answer your question...

You declare your XMLDocument inside your try block. therefore, as soon as you go out of the try block the document falls out of scope, and thus doesn't exist anymore. The solution would be to declare them outside the try block, but still assign them inside...something like this:



Note: I didn't actually test/compile this, so i'm not 100% sure i have it correct...
+Pie Number of slices to send: Send
thanks. you are right i got it.
The first person to drink cow's milk. That started off as a dare from this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1728 times.
Similar Threads
converting xml to xsl
Syntax Error
reading from a file
Validate XML against XSD using the Xerces DOM Parser
package problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:44:48.