libsbml.XMLToken.getNamespaceURI C# (CSharp) Method

getNamespaceURI() public method

public getNamespaceURI ( ) : string
return string
        public string getNamespaceURI()
        {
            string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_2(swigCPtr);
            return ret;
        }

Same methods

XMLToken::getNamespaceURI ( int index ) : string
XMLToken::getNamespaceURI ( string prefix ) : string

Usage Example

コード例 #1
0
ファイル: TestXMLToken.cs プロジェクト: mgaldzic/copasi_api
 public void test_XMLToken_namespace_set_clear()
 {
     XMLTriple triple = new  XMLTriple("test","","");
       XMLAttributes attr = new  XMLAttributes();
       XMLToken token = new  XMLToken(triple,attr);
       XMLNamespaces ns = new  XMLNamespaces();
       assertTrue( token.getNamespacesLength() == 0 );
       assertTrue( token.isNamespacesEmpty() == true );
       ns.add( "http://test1.org/", "test1");
       ns.add( "http://test2.org/", "test2");
       ns.add( "http://test3.org/", "test3");
       ns.add( "http://test4.org/", "test4");
       ns.add( "http://test5.org/", "test5");
       token.setNamespaces(ns);
       assertTrue( token.getNamespacesLength() == 5 );
       assertTrue( token.isNamespacesEmpty() == false );
       assertTrue( (  "test1" != token.getNamespacePrefix(0) ) == false );
       assertTrue( (  "test2" != token.getNamespacePrefix(1) ) == false );
       assertTrue( (  "test3" != token.getNamespacePrefix(2) ) == false );
       assertTrue( (  "test4" != token.getNamespacePrefix(3) ) == false );
       assertTrue( (  "test5" != token.getNamespacePrefix(4) ) == false );
       assertTrue( (  "http://test1.org/" != token.getNamespaceURI(0) ) == false );
       assertTrue( (  "http://test2.org/" != token.getNamespaceURI(1) ) == false );
       assertTrue( (  "http://test3.org/" != token.getNamespaceURI(2) ) == false );
       assertTrue( (  "http://test4.org/" != token.getNamespaceURI(3) ) == false );
       assertTrue( (  "http://test5.org/" != token.getNamespaceURI(4) ) == false );
       token.clearNamespaces();
       assertTrue( token.getNamespacesLength() == 0 );
       ns = null;
       token = null;
       triple = null;
       attr = null;
 }
All Usage Examples Of libsbml.XMLToken::getNamespaceURI