I’m writing a script that will convert one file type to another (for some song presentation software normally used by churches.) I can not extract all the song lyrics and relevant data from the one file type, now I need to convert it to the other.
The other filetype is stored as RTFdata inside XML nodes. For example:
RTFData="e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcY29jb2FydGY5NDlcY29jb2FzdWJydGY1NDAKe1xmb250dGJsXGYwXGZzd2lzc1xmY2hhcnNldDAgSGVsdmV0aWNhO30Ke1xjb2xvcnRibDtccmVkMjU1XGdyZWVuMjU1XGJsdWUyNTU7fQpccGFyZFx0eDU2MFx0eDExMjBcdHgxNjgwXHR4MjI0MFx0eDI4MDBcdHgzMzYwXHR4MzkyMFx0eDQ0ODBcdHg1MDQwXHR4NTYwMFx0eDYxNjBcdHg2NzIwXHFjXHBhcmRpcm5hdHVyYWwKClxmMFxmczEyMCBcY2YxIFdpdGggZXZlcnkgYnJlYXRoXApXaXRoIGV2ZXJ5IHN0ZXB9"
So first, I need to be able to decode these strings so I can see how they are assembled, but once I figure that out I also need a way to convert strings into this format.
I’ve searched around on google but found no good solution for encoding or decoding RTFdata with PHP. Any ideas?
Some quick Googling turned this up: RTFGen