/** * Parse the specified DOM element and instantiate the properties * of this instance. * * @param element XML element to parse. Non-null. */ void update(XElement element) { //Debug.Assert(element != null : "element cannot be null"; time = XmlUtil.update(element, "dTim", time); md = XmlUtil.update(element, "md", md); activityCode = XmlUtil.update(element, "activityCode", activityCode); activitySubcode = XmlUtil.update(element, "activitySubcode", activitySubcode); var channelElements = element.Elements(element.Name.Namespace + "channel");//, element.getNamespace()); foreach (Object subElement in channelElements) { XElement channelElement = (XElement)subElement; WitsmlRealtimeChannel channel = new WitsmlRealtimeChannel(channelElement); channels.Add(channel); } XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace()); if (commonDataElement != null) commonData = new WitsmlCommonData(commonDataElement); }
/** * Parse the specified DOM element and instantiate the properties * of this instance. * * @param element XML element to parse. Non-null. */ void update(XElement element) { time = XmlUtil.update(element, "dTim", time); md = XmlUtil.update(element, "md", md); sequenceNumber = XmlUtil.update(element, "sequence", sequenceNumber); activityCode = XmlUtil.update(element, "activityCode", activityCode); XElement realtimeHeaderElement = element.Element(element.Name.Namespace + "realtimeHeader");//, element.getNamespace()); if (realtimeHeaderElement != null) { wellName = XmlUtil.update(realtimeHeaderElement, "nameWell", wellName); wellboreName = XmlUtil.update(realtimeHeaderElement, "nameWellbore", wellboreName); serviceCompany = XmlUtil.update(realtimeHeaderElement, "serviceCompany", serviceCompany); runNumber = XmlUtil.update(realtimeHeaderElement, "runNumber", runNumber); creationDate = XmlUtil.update(realtimeHeaderElement, "creationDate", creationDate); description = XmlUtil.update(realtimeHeaderElement, "description", description); } var channelElements = element.Elements(element.Name.Namespace + "channel");//, element.getNamespace()); foreach (Object subElement in channelElements) { XElement channelElement = (XElement)subElement; WitsmlRealtimeChannel channel = new WitsmlRealtimeChannel(channelElement); channels.Add(channel); } XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace()); if (commonDataElement != null) commonData = new WitsmlCommonData(commonDataElement); }