Exemple #1
0
 /// <summary> This method selects the string representing XPath expression
 /// Usually evalXPath is called afterwards
 /// </summary>
 /// <param name="s">
 /// </param>
 /// <throws>  XPathParseException </throws>
 public void  selectXPath(System.String s)
 {
     try
     {
         com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
         p.nsHash     = nsHash;
         p.symbolHash = symbolHash;
         xpe          = (com.ximpleware.Expr)p.parse().value;
         ft           = true;
         if (cachingEnabled)
         {
             xpe.markCacheable();
         }
     }
     catch (XPathParseException e)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         Console.WriteLine("Syntax error after  ==>" + s.Substring(0, e.getOffset()));
         throw new XPathParseException(e.ToString());
     }
     catch (System.Exception e) {
         throw new XPathParseException(e.ToString());
     }
 }
Exemple #2
0
		/// <summary> This method selects the string representing XPath expression
		/// Usually evalXPath is called afterwards
		/// </summary>
		/// <param name="s">
		/// </param>
		/// <throws>  XPathParseException </throws>
		public void  selectXPath(System.String s)
		{			
			try
			{
				com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
				p.nsHash = nsHash;
                p.symbolHash = symbolHash;
				xpe = (com.ximpleware.Expr) p.parse().value;
                ft = true;
                if (cachingEnabled)
                    xpe.markCacheable();
			}
			catch (XPathParseException e)
			{
				//UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
                Console.WriteLine("Syntax error after  ==>" + s.Substring(0, e.getOffset()));
                throw new XPathParseException(e.ToString());
			}
            catch (System.Exception e){
                throw new XPathParseException(e.ToString());
            }
		}
Exemple #3
0
 public override void markCacheable()
 {
     // TODO Auto-generated method stub
     e.markCacheable();
 }