• Post Reply Bookmark Topic Watch Topic
  • New Topic

Escaping double quotes be applied to reading from a file?  RSS feed

 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm using an xml file and the piece of data I want from the file looks like Staff id ="Test";

Is it something like this? Only seen two examples of it but I'm not sure they were reading from a file like myself.

 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So exactly what are you trying to do? Parsing the file?
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to find if staff id = 'Test' is actually in the the xml file and if it is retrieve it
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah assuming you know how to read the xml file, once you read the line or value of some tag you can do something like:



Single quote and double quote are different.
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou very much - I got it in the end - I've only just seen this but will be useful for future reference so thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!