예제 #1
0
        private string ParseXPathVATInfo(HtmlDocument doc, Configuration configXPath)
        {
            string strVAT = "";

            try
            {
                foreach (string VATInfoXPath in configXPath.VATInfoXPath)
                {
                    if (VATInfoXPath.Trim() != "")
                    {
                        var node_VAT = doc.DocumentNode.SelectSingleNode(VATInfoXPath);
                        if (node_VAT != null)
                        {
                            string tempVAT = GABIZ.Base.Tools.removeHTML(node_VAT.InnerText);
                            if (Common.ParseVATInfo(tempVAT) != -1)
                            {
                                strVAT += (string.IsNullOrEmpty(strVAT) ? "" : " ") + tempVAT;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
            return(strVAT);
        }
예제 #2
0
        private string ParseVatInfo(GABIZ.Base.HtmlAgilityPack.HtmlDocument doc, IEnumerable <string> VATInfoXPaths)
        {
            var vatInfo = "";

            foreach (var VATInfoXPath in VATInfoXPaths)
            {
                if (VATInfoXPath.Trim() != "")
                {
                    var node_VAT = doc.DocumentNode.SelectSingleNode(VATInfoXPath);
                    if (node_VAT != null)
                    {
                        string tempVAT = Tools.removeHTML(node_VAT.InnerText);
                        if (Common.ParseVATInfo(tempVAT) != -1)
                        {
                            vatInfo += (string.IsNullOrEmpty(vatInfo) ? "" : " ") + tempVAT;
                        }
                    }
                }
            }
            return(vatInfo);
        }