AnsweredAssumed Answered

SimpleTextParser next method throws AccessViolationException in ArcGIS 10.2.2

Question asked by deleted-user-AYsXjhkrwuAA on Jun 19, 2016
Latest reply on Jun 22, 2016 by Ahmed.ElSisiesrinea-esridist

I'm trying to use the SimpleTextParser class to parse text from the map layout that contains text formatting tags.  e.g. a string of <ITA>Data Sources</ITA>

 

SimpleTextParser formattingTextParser = new SimpleTextParser();
Boolean bHasTags = false;
formattingTextParser.Text = pTextElement.Text;
formattingTextParser.HasTags(ref bHasTags);
if (bHasTags)
   {
     //  At this point the textsymbol property is null on the text parser.  Parse text formatting. 
     formattingTextParser.Next();
    string formattedText  = formattingTextParser.TextSymbol.Text;
      }

 

I can successfully identify that the text contains tags, but when I try to parse these using the next method a System.AccessViolationException is thrown. Where am I going wrong?

The only other reference I can see  in the forums is another unhandled exception with this class.

 

Thanks

 

Andrew

Outcomes