libsbmlcs.XMLOutputStream.writeAttribute C# (CSharp) Method

writeAttribute() public method

public writeAttribute ( XMLTriple triple, bool value ) : void
triple XMLTriple
value bool
return void
        public void writeAttribute(XMLTriple triple, bool value)
        {
            libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_8(swigCPtr, XMLTriple.getCPtr(triple), value);
            if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
        }

Same methods

XMLOutputStream::writeAttribute ( XMLTriple triple, double value ) : void
XMLOutputStream::writeAttribute ( XMLTriple triple, int value ) : void
XMLOutputStream::writeAttribute ( XMLTriple triple, string value ) : void
XMLOutputStream::writeAttribute ( string name, bool value ) : void
XMLOutputStream::writeAttribute ( string name, double value ) : void
XMLOutputStream::writeAttribute ( string name, int value ) : void
XMLOutputStream::writeAttribute ( string name, string value ) : void
XMLOutputStream::writeAttribute ( string name, string prefix, bool value ) : void
XMLOutputStream::writeAttribute ( string name, string prefix, double value ) : void
XMLOutputStream::writeAttribute ( string name, string prefix, int value ) : void
XMLOutputStream::writeAttribute ( string name, string prefix, long value ) : void
XMLOutputStream::writeAttribute ( string name, string prefix, string value ) : void

Usage Example

 public void test_XMLOutputStream_PredefinedEntity()
 {
     OStringStream oss = new OStringStream();
       XMLOutputStream stream = new  XMLOutputStream(oss,"",false);
       stream.startElement( "testpde");
       stream.writeAttribute( "amp",     "&"     );
       stream.writeAttribute( "apos",    "'"     );
       stream.writeAttribute( "gt",      ">"     );
       stream.writeAttribute( "lt",      "<"     );
       stream.writeAttribute( "quot",    "\""    );
       stream.writeAttribute( "pdeamp",  "&amp;" );
       stream.writeAttribute( "pdeapos", "&apos;");
       stream.writeAttribute( "pdegt",   "&gt;"  );
       stream.writeAttribute( "pdelt",   "&lt;"  );
       stream.writeAttribute( "pdequot", "&quot;");
       stream.endElement( "testpde");
       string expected = "<testpde amp=\"&amp;\" apos=\"&apos;\" gt=\"&gt;\" lt=\"&lt;\" " +
       "quot=\"&quot;\" pdeamp=\"&amp;\" pdeapos=\"&apos;\" pdegt=\"&gt;\" " + "pdelt=\"&lt;\" pdequot=\"&quot;\"/>";
       string s = oss.str();
       assertTrue(( expected == s ));
       stream = null;
 }
All Usage Examples Of libsbmlcs.XMLOutputStream::writeAttribute