How the image is encoded into XML? Can you give an example? Is it a CDATA section with Base64 or something else? If it's a known encoding, you just read it as an attribute / tag value and then decode using an appropriate decoder, then open the file in binary mode and save the decoded version there. If it's paperclip that accepts the XML, there's such thing as processors that you can use to write a processor that extracts the image and replaces the original XML file with the extracted thing.
In order to put the image back into XML, again you use the encoder (Base64, for example) and put the resulting value inside the tag. Again, if you give a sample XML, I may be able to give more precise suggestions. Cheers, - A On Sep 2, 12:18 pm, johnnybutler7 <[email protected]> wrote: > Hi, > > I have an xml file which contains an embedded image(this is not from a > rails application), i cant get a clear answer on this so basically i > need to know is there a way i can read the image from the xml file and > then store it to the file system somewhere? Im using paperclip as my > means of managing files. > > On another note, can you embed an image in an xml file from rails? > > I thought the easiest solution would be to provide a link to the > physical image and get it that way, > > Any advice appreciated, > > JB -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

