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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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.

   
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.