Apologies if this is a really stupid question… I’m trying to find the best way to embed an XML file into an executable build and then parse the contents. Previously I had been doing this with relatively small files and just a straight conversion to String and then using
static XmlElement* XmlDocument::parse ( const String & xmlData ) to parse was working fine.
However, now I have a couple of larger files, which the Projucer converts to binary representations due to the MS compiler string literal limitation. My first attempt was to use the
String::fromUTF8() static method to create a String, but the contents are being truncated. When the XML file is outside the executable I just parse it using the
static XmlElement* XmlDocument::parse ( const File & file ) method.
I couldn’t find an obvious way to get the contents of a BinaryData element into a
File without writing out to disk first. Am I missing something, or is there a better way to think about this?