Read text-segment from binary file

K

Klaus Jensen

Hi

I have some binary files (jpeg), which contain a lot of image-data - and
some embedded XML (XMP actually).

If I view the file in a hex-editor, there is a lot of binary data - and then
in the middle of everything:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
[etc etc]

I need to load this file in some kind of reader, search for the <?xml as
start and </plist> as the end of the xml, and return this string for further
processing.

How do I do that? C# or VB please, I do not understand the other languages.

I tried just loading it into a streamreader to check out what happened, but
I only got garbage from the reader...

Any help will be greatly appreciated :)

Regards

- Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top