title: Can SAX Parsers use XPath in Java?
body: <p>I'm trying to migrate one of my classes which uses <code>DOM</code> parsing with lots of <code>XPath</code> expressions to <code>SAX</code> parsing. <code>DOM</code> Parsing was good for me but some of the files i try to parse are too big and they cause server timeouts. I want to reuse the <code>XPath</code> with the <code>SAX</code> parsing but i'm not sure if it is possible and if not possible could you please help me because i have no idea how  the following code will be when i use only <code>SAX</code>:</p>
  
  <pre><code>Document doc = bpsXml.getDocument();
  String supplierName = BPSXMLUtils.getXpathString(doc, "/Invoice/InvoiceHeader/Party[@stdValue='SU']/Name/Name1");
  String language = BPSXMLUtils.getXpathString(doc, "/Invoice/InvoiceHeader/InvoiceLanguage/@stdValue");
  </code></pre>