This is a migrated thread and some comments may be shown as answers.

How to get the exact format of XML file in the HTML view of Radedit control

3 Answers 140 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
hemanth
Top achievements
Rank 1
hemanth asked on 03 Sep 2010, 02:24 PM
Hi All,

My question goes here .

I am dynamically binding the data (XML content) to the Radeditor control . Once the page has been loaded , if i am going to the HTML view , formatting of XML data is not in the order , like ..

<TransactionBlk name="StdTransBlk" majorVersion="1" minorVersion="2" actor="Next" mustUnderstand="1">
 <EncodingTypeCd /> <CharacterSetCd /><MessageId /><OriginatorNm>WFISVA</OriginatorNm>ServiceNm>InquireFraudDetails</ServiceNm>

** But i want the XML data to be displayed like :

<TransactionBlk name="StdTransBlk" majorVersion="1" minorVersion="2" actor="Next" mustUnderstand="1">
  <EncodingTypeCd />
  <CharacterSetCd />
  <MessageId />
  <CorrelationId />
  <OriginatorNm>WFISVA</OriginatorNm>
  <ServiceNm>InquireFraudDetails</ServiceNm>


Can anyone help me on the same . it is bit urgent.
Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 09 Sep 2010, 11:21 AM
Hi Hemanth,

Please note that RadEditor is an HTML Editor but not XML Editor. When going to HTML View mode the content's markup is formatted by the IndentHTMLContent built-in content filter. This filter is formatting the code according specific HTML tags.

You can disable this content filter in order to preserve the original formatting of the inserted content. More information on how to disable built-in filters is available in the following help article:
Content Filters

Kind regards,
Dobromir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hemanth
Top achievements
Rank 1
answered on 10 Sep 2010, 08:49 AM
Hi Dobromir ,

Thanks for your valuable reply. Now i am able to get the XML content in indented format. But the issue is XML content is not coming in the native way. some XML tags are not coming in the proper way. like (tag <SEREMTSFTWVERSNBR/> is coming as <SEREMTSFTWVERSNBR> ).

Could you please suggest me how can i get the exact XML format in the editor control.

My basic requirement is once i displayed the  XML  content in the EDITOR control in the indented format , if i made any changes to the HTML content inside the editor control , i want to get the modified content and need to be  posted  the same to new XML file to the another page.

The content is coming in the
0
Dobromir
Telerik team
answered on 15 Sep 2010, 12:30 PM
Hi Hemanth,

To fix this problem my recommendation is to provide a namespace to your custom XML tags and you need to disable the ConvertToXhtml content filter, e.g:
<my:property>Sample Content</my:property>

It is recommended to set a namespace to the custom tags in Internet Explorer. You can find more information in this MSDN article: Using Custom Tags in Internet Explorer.

In addition, as I said in my previous post, RadEditor is not an XML editor and it offers support for valid HTML / XHTML tags only.

Sincerely yours,
Dobromir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Getting Started
Asked by
hemanth
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
hemanth
Top achievements
Rank 1
Share this question
or