private string FindDefaultWebPage(adlcp_rootv1p2.imscp.manifestType root) { if (root.Hasorganizations()) { adlcp_rootv1p2.imscp.organizationsType orgs = root.Getorganizations(); if (orgs.Hasorganization()) // its possible but fatal to have a blank "organizations" node { string org_default = ""; if (orgs.Hasdefault2()) { org_default = orgs.default2.ToString(); var org = FindDefaultOrg(org_default, orgs); string identifier1 = ""; if (org.Hasidentifier()) { identifier1 = org.Getidentifier().ToString(); } if (org.Hastitle()) { title = org.Gettitle().ToString(); } if (org.Hasitem()) { int i = org.GetitemCount(); if (i > 0) { adlcp_itemType item = org.GetitemAt(0); adlcp_rootv1p2.imscp.identifierrefType2 item_identifier = item.identifierref; // // find the resource for this item // adlcp_rootv1p2.imscp.resourceType resource = FindDefaultResource(item_identifier, root.resources); if (resource.Hashref()) { href = resource.href.ToString(); return(href); } } } } } } // end of "organizations" object return(""); }
public void ReplaceitemAt(adlcp_itemType newValue, int index) { ReplaceDomElementAt("http://www.imsproject.org/xsd/imscp_rootv1p1p2", "item", index, newValue); }
public void Additem(adlcp_itemType newValue) { AppendDomElement("http://www.imsproject.org/xsd/imscp_rootv1p1p2", "item", newValue); }