libsbmlcs.XMLNode.hasChild C# (CSharp) Method

hasChild() public method

public hasChild ( string name ) : bool
name string
return bool
        public bool hasChild(string name)
        {
            bool ret = libsbmlPINVOKE.XMLNode_hasChild(swigCPtr, name);
            if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
            return ret;
        }

Usage Example

 public void test_XMLNode_hasChild()
 {
     string xmlstr = "<annotation>\n" + "  <test xmlns=\"http://test.org/\" id=\"test\">test</test>\n" + "</annotation>";
       XMLNode node = new XMLNode();
       assertTrue( node.hasChild( "test") == false );
       node = null;
       node = XMLNode.convertStringToXMLNode(xmlstr,null);
       assertTrue( node.hasChild( "test") == true );
       node = null;
 }