Home » U++ Library support » RichText,QTF,RTF... » QTF question -how to insert a QTF string into an XML file?
QTF question -how to insert a QTF string into an XML file? [message #30567] |
Sun, 09 January 2011 01:17 |
mubeta
Messages: 77 Registered: October 2006
|
Member |
|
|
Hi guys,
There is some problem to insert a QTF string in an XML file, as a text part of the node ?
QTF does not include information about page setup and margins, and i am developing a my file type based on XML where the QTF will be stored as a text of a node. I just hope that there is no conflict problem when opening and parsing the XML file.
Thanks.
[Updated on: Mon, 10 January 2011 01:57] by Moderator Report message to a moderator
|
|
|
Re: QTF question [message #30568 is a reply to message #30567] |
Sun, 09 January 2011 13:01 |
|
mubeta wrote on Sun, 09 January 2011 01:17 | Hi guys,
There is some problem to insert a QTF string in an XML file, as a text part of the node ?
QTF does not include information about page setup and margins, and i am developing a my file type based on XML where the QTF will be stored as a text of a node. I just hope that there is no conflict problem when opening and parsing the XML file.
Thanks.
|
Hi Mubeta,
QTF can contain characters that are illegal in XML text, namely < and &, so those must be replaced by entities < and &. If you are using U++ to create the XML than the replacement is automatic, so you don't have to worry about that. There should be no other problems, I believe.
Best regards,
Honza
|
|
|
|
Re: QTF question [message #30574 is a reply to message #30573] |
Sun, 09 January 2011 22:10 |
|
chickenk wrote on Sun, 09 January 2011 21:09 | Or another cleaner solution to keep the QTF as-is is to enclose the QTF content in a CDATA block. I believe the core Upp XML classes handle them correctly, i.e. don't apply any transformations on them.
Lionel
|
Hi Lionel,
I actually didn't mention that on purpose CDATA section can't contain "]]>", but this string can appear legally in QTF.
Honza
|
|
|
Re: QTF question [message #30578 is a reply to message #30574] |
Mon, 10 January 2011 09:48 |
mubeta
Messages: 77 Registered: October 2006
|
Member |
|
|
Well, thanks for all replies. I do it, and is is working fine, without any transformation of the qtf, included images.
|
|
|
Goto Forum:
Current Time: Thu Apr 18 07:24:23 CEST 2024
Total time taken to generate the page: 0.03057 seconds
|