libsbmlcs.XMLOutputStream.startElement C# (CSharp) Method

startElement() public method

public startElement ( XMLTriple triple ) : void
triple XMLTriple
return void
        public void startElement(XMLTriple triple)
        {
            libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple));
            if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
        }

Same methods

XMLOutputStream::startElement ( string name ) : void
XMLOutputStream::startElement ( string name, string prefix ) : void

Usage Example

 public void test_XMLOutputStream_CharacterReference()
 {
     OStringStream oss = new OStringStream();
       XMLOutputStream stream = new  XMLOutputStream(oss,"",false);
       stream.startElement( "testcr");
       stream.writeAttribute( "chars",    "one"     );
       stream.writeAttribute( "amp",      "&"       );
       stream.writeAttribute( "deccr",    "¨"  );
       stream.writeAttribute( "hexcr",    "¨");
       stream.writeAttribute( "lhexcr",   "¨");
       stream.writeAttribute( "nodeccr1", "&#01688"  );
       stream.writeAttribute( "nodeccr2", "&#;"     );
       stream.writeAttribute( "nodeccr3", "&#00a8;" );
       stream.writeAttribute( "nodeccr4", "&#00A8;" );
       stream.writeAttribute( "nohexcr1", "&#x;"    );
       stream.writeAttribute( "nohexcr2", "&#xABCD" );
       stream.endElement( "testcr");
       string expected = "<testcr chars=\"one\" amp=\"&amp;\" deccr=\"&#0168;\" hexcr=\"&#x00a8;\" " +
     "lhexcr=\"&#x00A8;\" nodeccr1=\"&amp;#01688\" nodeccr2=\"&amp;#;\" " +
     "nodeccr3=\"&amp;#00a8;\" nodeccr4=\"&amp;#00A8;\" " +
     "nohexcr1=\"&amp;#x;\" nohexcr2=\"&amp;#xABCD\"/>";
       string s = oss.str();
       assertTrue(( expected == s ));
       stream = null;
 }
All Usage Examples Of libsbmlcs.XMLOutputStream::startElement