예제 #1
0
        /// <exception cref="Ca.Infoway.Messagebuilder.Marshalling.HL7.XmlToModelTransformationException"></exception>
        private string GetTextValue(XmlElement element, XmlToModelResult xmlToModelResult)
        {
            string result = NodeUtil.GetTextValue(element, true);

            if (StringUtils.IsBlank(result))
            {
                xmlToModelResult.AddHl7Error(new Hl7Error(Hl7ErrorCode.DATA_TYPE_ERROR, "Expected PN child node \"" + element.Name + "\" to have a text node"
                                                          , element));
            }
            return(result);
        }
예제 #2
0
        private string GetTextValue(XmlElement element, XmlToModelResult xmlToModelResult)
        {
            string result = NodeUtil.GetTextValue(element, true);

            if (StringUtils.IsBlank(result))
            {
                result = null;
                if (!element.HasAttribute(AbstractNameR2ElementParser <V> .NULLFLAVOR_ATTRIBUTE))
                {
                    RecordError("Expected PN child node \"" + element.Name + "\" to have a text node", element, xmlToModelResult);
                }
            }
            return(result);
        }
예제 #3
0
        protected virtual string GetOriginalText(XmlElement element)
        {
            XmlNodeList children = element.ChildNodes;
            string      result   = null;

            if (children != null)
            {
                foreach (XmlNode node in new XmlNodeListIterable(children))
                {
                    if (node.NodeType != System.Xml.XmlNodeType.Element)
                    {
                    }
                    else
                    {
                        if ("originalText".Equals(NodeUtil.GetLocalOrTagName(node)))
                        {
                            result = NodeUtil.GetTextValue(node);
                        }
                    }
                }
            }
            return(result);
        }