MS VBA and XPath 2.0

Are there any VBA libraries that will allow me to use XPath 2.0 in VBA? MSXML6 does not work with XPath 2.0.

Basically, I want to parse XML documents using XPath 2.0, since it allows me to use functions in an XPath expression to filter an XML document. As an example, using the current-date () function would be useful, since I could get data that exceeds a certain date. If I used XPath 1.0, I would need an arbitrary loop, although the dates returned by XPath and compare which dates were greater than a certain date.

Do you have any ideas on how I can use XPath 2.0 in Excel 2003 VBA or any alternatives to my problem?

Thanks in advance for your help.

Donald

+3
source share
4 answers

Forgive my ignorance for not knowing XPath2.

Could you use the XPath criteria using the date value from VB instead?
I mean "/ Date> 9/9/2009" - where 9/9/2009 is the current date, and this comes from VB.

Let me know if I do not understand the question.

+3
source

No . In my opinion, there is no version of Microsoft XPath 2.0.

+2
source

Dimitre - , (. ), .NET VBA, Saxon .NET, IKVM- Java Saxon .NET.

+1

Altova offers its XSLT and XPath 2.0 and XQuery 1.0 processors as a download for Windows, see http://www.altova.com/altovaxml.html . This is a COM application that can be scripted / automated so you can use it with VBA, an example is provided in the documentation . I don't think there is an API for using pure XPath 2.0, but there is an API for using XQuery 1.0, and XPath 2.0 is a subset of XQuery 1.0.

0
source

Source: https://habr.com/ru/post/1717274/


All Articles