XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
hui seeSubject: Convert RTF to XML/XSLT
Author: hui see
Date: 13 Mar 2006 03:28 AM
Hi,

I'm trying to convert a RTF file to XML and it doesn't seem to work.
Please advise me on what's the correct steps.

Thanks,
huisee

Postnext
Minollo I.Subject: Convert RTF to XML/XSLT
Author: Minollo I.
Date: 13 Mar 2006 08:44 AM
You can convert a RTF document into an XML format using the Stylus Studio converters (when opening the RTF file, click the "Convert to XML" button in the Open File dialog, and then choose the RTF converter). If that doesn't work, some more details about what "doesn't work" means may help; also, attaching the RTF you are trying to convert would help too.

Thanks,
Minollo

Postnext
hui seeSubject: Convert RTF to XML/XSLT
Author: hui see
Date: 13 Mar 2006 07:59 PM
Hi Millono,

Thanks for the prompt reply.

First I used WordPad to create a file with certain setting like bigger font and highlighted it with color. Saved it as a RTF file.
Then I did the way as you mentioned, which open the file using the Convert To XML. But there is no way for me to see the same setting as it supposed to have with this RTF file.

May I know what should I do in order to see the exact same format setting? Any configuration or setting need to be done?

Thanks again.

regards,
huisee

Postnext
Minollo I.Subject: Convert RTF to XML/XSLT
Author: Minollo I.
Date: 13 Mar 2006 09:02 PM
The XML converters will translate the RTF format into an XML format, including the formatting information. But you shouldn't expect to see the formatting information rendered as the text *format*; you will see the formatting information returned as part of the XML information in which the RTF is encoded.

For example, if you try to write a few words in WordPad, save the result and open it specifying to convert it to XML and then choosing the RTF converter, you will get this XML document:
<rtf value="1">
<ansi/>
<ansicpg value="1252"/>
<deff value="0"/>
<deflang value="1033"/>
<fonttbl>
<f value="0">
<fswiss/>
<fcharset value="0"/>Arial;</f>
</fonttbl>
<generator ignorable="yes">Msftedit 5.41.15.1507;</generator>
<viewkind value="4"/>
<uc value="1"/>
<pard/>
<f value="0"/>
<fs value="20"/>I am a test!<par/></rtf>

Note the "I am a test" string a the bottom; that's what I types. Now, go back to WordPad, and make "test" bold; refresh the document in Stylus Studio and you will get this:

<?xml version="1.0" encoding="utf-8"?>
<rtf value="1">
<ansi/>
<ansicpg value="1252"/>
<deff value="0"/>
<deflang value="1033"/>
<fonttbl>
<f value="0">
<fswiss/>
<fcharset value="0"/>Arial;</f>
</fonttbl>
<generator ignorable="yes">Msftedit 5.41.15.1507;</generator>
<viewkind value="4"/>
<uc value="1"/>
<pard/>
<f value="0"/>
<fs value="20"/>I am a <b/> test<b value="0"/> !<par/></rtf>

Note that the "test" block is now marked as being bold. Other formatting instructions will be formatted in a similar way.

The XML conversion of RTF preserves the formatting information; but the raw XML itself is not a presentation language; it won't "render" the formatting information as you would see it. But once the RTF is available as XML you can use it to carry one additional computation, or even to transform the document is some different presentational language (like HTML).

Hope this helps,
Minollo

Posttop
Oksana RevyakinaSubject: Convert RTF to XML/XSLT
Author: Oksana Revyakina
Date: 27 Nov 2006 03:51 AM
Actually, Iím using RTF TO XML Converter http://www.rtf-to-xml.com by Novosoft LLC. It is really easy to use and powerful converter.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.