コード例 #1
0
        private static DocumentRow ExtractHeaderInformation(XmlNode childNode, Document document)
        {
            var docRow = new DocumentRow(document);

            foreach (XmlNode xmlNode in childNode.ChildNodes)
            {
                if (xmlNode.Attributes != null && xmlNode.Attributes.Count > 0)
                {
                    var nameAttrib = xmlNode.Attributes.GetNamedItem("NAME");
                    if (nameAttrib.IsNull())
                    {
                        nameAttrib = xmlNode.Attributes.GetNamedItem("name");
                    }
                    if (nameAttrib.IsNull())
                    {
                        nameAttrib = xmlNode.Attributes.GetNamedItem("Name");
                    }
                    if (nameAttrib != null)
                    {
                        docRow.Add(nameAttrib.InnerText);
                    }
                    else
                    {
                        docRow.Add(GetNameFromNode(xmlNode));
                    }
                }
                else
                {
                    docRow.Add(GetNameFromNode(xmlNode));
                }
            }
            return(docRow);
        }
コード例 #2
0
        private static DocumentRow ParseRow(IExcelDataReader reader, Document parent)
        {
            var docRow = new DocumentRow(parent);

            for (var i = 0; i < reader.FieldCount; i++)
            {
                docRow.Add(reader.GetString(i));
            }
            return(docRow);
        }
コード例 #3
0
        private static DocumentRow GetRow(XmlNode childNode, Document document)
        {
            var docRow = new DocumentRow(document);

            foreach (XmlNode xmlNode in childNode.ChildNodes)
            {
                docRow.Add(xmlNode.InnerText);
            }
            return(docRow);
        }
コード例 #4
0
 protected static void AddColumn(DocumentRow documentRow, string collumn)
 {
     documentRow.Add(collumn);
 }