NANT Build Scripts If Condition, -


I have a question about nanat build scripts, I am quite new to Nant Bild, if I run a style basis then on a certain condition in an XML file

count ($ {skinFolder} / screens Temp.xml // ActionCollection / Item)> 0

Is there a way to get this? << P>

project node script node: < / P>

  & lt; Script language = "c #" prefix = "custom" & gt; & Lt; Code & gt; & Lt ;; [CDATA [[Function ("evaluation-xpath")] Public static string EvaluateXPath (string xpath, string information) {System.Xml.XPath.XPathDocument xml = new System.Xml.XPath.XPathDocument (info); Return xml.CreateNavigator (). Evaluation (xpath). Ostring (); }] & Gt; & Lt; / Code & gt; & Lt; / Script & gt;  

Then you can use the following expression to get what you want:

  if = "$ {int :: parse (custom :: Evaluation- xpath ('Count (Action Action / Item)', Path :: Alliance (Skin Fledder 'screens.temp.xml')))  
< P> Just note that if your XML file contains nodes that have a namespace, then this will not work.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -