• Post Reply Bookmark Topic Watch Topic
  • New Topic

converting a node to a file

 
Dexter O'Connell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
is it possible to convert a node obeject into a file object???

heres the code ive tried

ImageInputStream iisInput = ImageIO.createImageInputStream((File) node);

but the compiler tells me its not possible to convert a node into a file.
ive also tried to convert it into an object and then into a file but with no success.

thanks for any help

dex
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of object is 'node'? Is it one of your own design? If so does it have a method something like getFilePath() or a field like 'String fileName'

If so, do something like:



...apologies if I have mis-understood your question, but it is not clear what 'node' is.
 
Dexter O'Connell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the node is one that was created by the wc3. org.w3c.dom.Node;
ive actually solved the problem in the meantime. thanks for your help. its a wee bit messy to explain what i did so il leave that for another day.

thanks again

dex
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!