TOC PREV NEXT INDEX


Inner Classes



The generation of code for XER causes the following inner class definition to be generated:

   public class SaxHandler : Asn1XerSaxHandler {
 
      Asn1XerSaxHandler mElemSaxHandler;
 
      StringBuffer mCurrElemValue;
 

 
      internal SaxHandler() {
 
         <code ..>
 
      }
 

 
      public void StartElement (string namespaceURI, string localName,
 
                                string qName, Attributes atts)
 
      {
 
         <code ..>
 
      }
 

 
      public void Characters (char[] ch, int start, int length)
 
      {
 
         <code ..>
 
}

      public void EndElement (string namespaceURI,
 
                              string localName, string qName)
 
      {
 
         <code ..>
 
      }
 
   }
 

This is an implementation of a standard SAX content handler class. As the XML parser software parses messages, the methods within this class are invoked with the parsed content. The StartElement method is invoked after a start element tag (<tag>) is parsed. The Characters method is invoked one or more times to pass the content between tags into the application. The EndElement method is invoked when an end element tag (</tag>) is encountered.

The ASN1C compiler generates custom code for each ASN.1 type within a given specification to parse the XML contents and fill in the generated C# objects.


Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX

Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.


This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.