草庐IT

sec-regular-expressions-patterns

全部标签

xml - Web.xml:url-pattern 标签是相互关联的吗?

myName/aName.../*...这是web.xml的摘录(使用它来配置jboss/tomcatweb服务)。只是想知道url-pattern在web-resource-collection相对于url-pattern在servlet-mapping. 最佳答案 用于为给定请求选择约束的url-pattern与任何事物都不相关。这里Servlet规范的有趣部分是:SRV.12.8.3ProcessingRequestsWhenaServletcontainerreceivesarequest,itshallusethealgo

javascript - TypeError : Value undefined (result of expression xmlDoc. 加载)不是对象

我正在尝试使用Javascript加载XML文件,但我还没有找到适用于IE、Firefox和Safari的良好功能。我目前使用的加载函数基本上是直接从w3schools教程中提取的函数:http://www.w3schools.com/XML/tryit.asp?filename=tryxml_dom_createelement具体代码如下:if(window.ActiveXObject){xmlDoc=newActiveXObject("Microsoft.XMLDOM");}//codeforMozilla,Firefox,Opera,etc.elseif(document.imp

c# - 系统.Xml.XPath.XPathException : Expression must evaluate to a node-set when executing SelectSingleNode ("//(artist|author)")

有人能解释一下为什么这不起作用吗?我正在执行XmlNodexmlNode=xmlDocument.SelectSingleNode("//(artist|author)");我明白了System.Xml.XPath.XPathException:Expressionmustevaluatetoanode-set.butthisworksanddoesnotraisetheexceptionevenwhentherearemanyartistnodesXmlNodexmlNode=xmlDocument.SelectSingleNode("//artist");

python - 如何调试 lxml.etree.XSLTParseError : Invalid expression error

我试图找出为什么lxml无法解析由具有各种xml:include的“根”文档组成的XSL文档。我得到一个错误:Traceback(mostrecentcalllast):File"s.py",line10,inxslt=ET.XSLT(ET.parse(d))File"xslt.pxi",line409,inlxml.etree.XSLT.__init__(src/lxml/lxml.etree.c:151978)lxml.etree.XSLTParseError:Invalidexpression这告诉我错误在lxml源中的什么位置,但是有没有办法通过lxml获得更多关于xsl中错误

c# - 异常 : The XPath expression evaluated to unexpected type System. Xml.Linq.XAttribute

我有一个如下所示的XML文件:Prasad19986730630City1IndiaCity2India现在我想获取所有地址类型。我像下面这样使用XPath进行了尝试,但出现了异常。varxPathString=@"//Employee/Address/@Type";doc.XPathSelectElements(xPathString);//docisXDocument.Load("xmlfilePath")Exception:TheXPathexpressionevaluatedtounexpectedtypeSystem.Xml.Linq.XAttribute.我的XPath有问

c# - "Expression must evaluate to a node-set."

我有一个问题我的XML文件在这里:Tarih24.07.201318:59:45USD1.91201.9220EUR2.52802.5430我如何解析这个XML文件我是这样编码的,但我收到了一条解析错误消息;if(tip==DövizKuruTipi2.Alış)Line44:returnDecimal.Parse(doc.SelectNodes("//ALTINKAYNAK/DOVIZ/ADI="+dovizKuru2+"/ALIS")[0].InnerText.Replace('.',','));Expressionmustevaluatetoanode-set

.net - 检查节点是否存在报错 "Expression must evaluate to a node-set"如何解决?

我正在尝试使用以下.NET代码检查节点是否存在:xmlDocument.SelectSingleNode(String.Format("//ErrorTable/ProjectName/text()='{0}'",projectName));这总是引发:XPathException:Expressionmustevaluatetoanode-set.为什么会出现此错误,我该如何解决?谢谢。 最佳答案 给定的表达式计算为bool值,而不是节点集。我假设您想检查ProjectName是否等于参数化文本。在这种情况下你需要写//Error

xml - cvc 模式有效 : Value 'A' is not facet-valid with respect to pattern '^[A-Za-z]?$' for type 'whatever'

这是验证失败的特定XML标记:A该标签的XSD:我得到的错误:cvc-pattern-valid:Value'A'isnotfacet-validwithrespecttopattern'^[A-Za-z]?$'fortype'MiddleInitial'.我正在使用的验证器:http://tools.decisionsoft.com/schemaValidate/正则表达式看起来不错。^匹配开头、$、结尾、?是字母A-Z或a-z的零次或一次。有什么想法吗? 最佳答案 来自w3规范RegularExpressions(Appendi

windows - 如何在 IIS Express 中引用 native 文件?

我拥有的是一个Asp.NetMVC项目,它引用了一个c++/cli程序集,而该程序集又引用了一些nativec++dll。这最终以Web角色发布到AzureWeb服务。This建议在启动任务中将原生dll复制到“%windir%\system32\inetsrv”文件夹中,以便web角色在角色启动时可以找到它们。这在云上按预期工作。然而,在本地调试时,我希望IISExpress可以使用这些dll。这些是64位dll,因此我必须运行64位版本的IISexpress。我正在尝试计算IISExpress64位的%windir%\system32\inetsrv的等价物。

c++ - Visual Studio Express 显示错误 : "internal error occured in compiler"

我使用cmake为c++库g2o创建了visualstudio文件。但是当我尝试构建它时,它无法在某些模板定义中显示错误。templateinlinevoidaxpy(constEigen::MatrixXd&A,constEigen::Map&x,intxoff,Eigen::Map&y,intyoff){y.segment(yoff,A.rows())+=A*x.segment(xoff,A.cols());}由于我不是c++专家,所以我不确定这行代码出了什么问题。我尝试评论此代码并进行构建。然后构建在下一个模板定义上失败。是visualstudio的问题吗?显示的错误是相同的代码