Posted 5 years ago by Evgeny
Version: 14.2.0611
Avatar

I need to be able to edit xml fragments (i.e. xml without the root node) in Actipro Syntax Editor with web languages addon. Now if I paste such fragment into editor, it will report an error about missing root element. This error report is completely valid, however my question is: is there a way to change this behavior and allow xml fragments without root element? Just like what XmlReaderSettings.ConformanceLevel.Fragment does in .NET framework for xml validation.

Comments (2)

Answer - Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

One thing I would probably suggest is to use our HeaderText and FooterText mechanism.  With that you could put some stub start root tag in the HeaderText and an end root tag in the FooterText.  Then everything will validate as is since the parser and validation combine header and footer text with the document text.  Does that help solve the problem for you?


Actipro Software Support

Posted 5 years ago by Evgeny
Avatar

Good idea, and yes it worked. Thanks for the fast help!

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.