Problem with Syntaxlanguage.SaveToXml

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by shark92651
I would assume that the XML that is saved from the SaveToXml call would be of the same structure as the samples included in the demo app. After calling SaveToXml to save my language definition, I get an error when I call LoadFromXml using that file. I notice that after calling SaveToXml that the structure of the XML is different - in particular, the following extra tags are added:

<?xml version="1.0"?>
<!-- SQL Language Definition -->
<SyntaxLanguage Key="SQL" LanguageDefinitionVersion="2.0" Secure="False" xmlns="http://ActiproSoftware/SyntaxEditor/2.0/LanguageDefinition">

The original looks like this:

<SyntaxLanguage Key="SQL" LanguageDefinitionVersion="2.0" Secure="True" xmlns="http://ActiproSoftware/SyntaxEditor/2.0/LanguageDefinition">

Is this a known issue? Why can't LoadFromXml still work in the case where it encounters the <SyntaxLanguages> tag?


Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
What happens when you do a SaveToXml is that it does write things out differently since it has to support the possibility that you are saving multiple languages. If so, all the languages are written out to a single XML file under the SyntaxLanguages tag.

But the load should work on that file format as well as the format you're used to. I tested it myself a little bit ago and it seemed ok. If you still have problems can you tell me how to reproduce it in our sample application?

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.