Fast XPath API
JXP is a Fast XPath 1.0 compliant API.
Download :
http://www.japisoft.com/jxpath/download/unregistered.zip
Home :
http://www.japisoft.com/jxpath
Forum :
http://www.japisoft.com/forum/index.php
News :
Cache support for the navigator (by default enabled)
Fixed bug for simple expressions like 1+1
Fixed bug for // usage
A DOM document can be used rather than an Element
Main features :
* High performance full XPath 1.0 solution,
* 25% faster than jaxen,
* SAX - like event system,
* Inner expression tree for fast multiple document evaluation,
* Syntax error location and cause,
* DOM support,
* FastParser lightweight node support,
* Customizable API with navigator, function libraries,
* Plugin for each node type system,
* Lower/Uppercase feature
* Full samples with DOM,
* Tested on 150 XPath expressions,
* Benchmark tests included,
* Package of 85 Ko
* Open source for the registered version,
* JDK1.1 and later compliant (tested on JDK1.1.8 and JDK1.4.1)
A.Brillant
http://www.japisoft.com
Mainly :
- Speed,
- Compact : 100Ko,
- Pluggable kit for custom node usage,
- JDK 1.1,
- Featuring like lowercase/uppercase for HTML.
Hope it replies,
A.Brillant
Similar Messages
-
FAST ESP 5.3 - is the FAST Search API of ESP 5.3 compatable with OS: Red Hat 5.1 & JDK: 1.6 Update 81 ?
Per ESP SP 5 release , below OS are supported which should be compatible with API:
Red Hat Enterprise Linux Release 5.8, 32-bit (and all 5.x minor versions below)
Red Hat Enterprise Linux Release 5.8, 64-bit (and all 5.x minor versions below)
Red Hat Enterprise Linux Release 6.3, 32-bit (and all 6.x minor versions below)
Red Hat Enterprise Linux Release 6.3, 64-bit (and all 6.x minor versions below)
SuSE Linux Enterprise Server 11, 64-bit
The latest JDK i have seen working on a customer install is jdk1.6.0_45.
Probably you can try update 81 and see if you run into any issues. -
I'm trying to parse an XML document using the Actionscript 2
XPath API. In one place I am using this as my xpath:
presentation/content[@contentName='wellness']/section[@sectionName='Nutrition/Weight']'
It fails when I use a slash in the "sectionName" attribute,
when I remove the slash in the XML file and change the xpath
accordingly it works fine. This XML is being generated for me, so I
really have no choice in the matter, the slash has to stay. Is
there something I can do to get around this problem?Mainly :
- Speed,
- Compact : 100Ko,
- Pluggable kit for custom node usage,
- JDK 1.1,
- Featuring like lowercase/uppercase for HTML.
Hope it replies,
A.Brillant -
Hi,
My Data XML converted through Xstream
<Data>
<id>1</id>
<name>Name</name>
<DataList>
<DataVO>
<VoId>100</VoId>
<value>Value1</value>
<ProductList>
<Product>
<ProductId>P101</ProductId>
<PName>Product Name1</PName>
</Product>
<Product>
<ProductId>P102</ProductId>
<PName>Product Name2</PName>
</Product>
</ProductList>
</DataVO>
<DataVO>
<VoId>101</VoId>
<value>Value2</value>
<ProductList>
<Product>
<ProductId>P201</ProductId>
<PName>Product NameX1</PName>
</Product>
<Product>
<ProductId>P202</ProductId>
<PName>Product NameX2</PName>
</Product>
</ProductList>
</DataVO>
</DataList>
</Data>
The Problem
=========
While I am maintaining the relationship parsing through XPath API , I am giving to fetch products as API path as "/Data/Datalist/DataVO/ProductList/Product/ProductId" to get the list of products, I can able to get the 4 Products NodeList, But I want to set the each products "VoId" , Like P101 related with 100, P102 related with 100, P201 related with 101, P202 related with 101. Any Sugesstions, parsing logics?Namespaces are not evaluated as XML constructs in XPath, but namespaces are required to be configured in the parser. Refer
Parsing with the JDOM XPath Class
http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html -
How to add Documents object faster(DI-API)
Hello,
I investigated the time concerning adding to Order Document using DI-API.
Result,339sec per 300 document(for each document has
4 items ,program was not use Start/End transaction).
This result is not so bad, but i wish faster time.
Please suggest faster way to add Documents object using
DI-API.
My source code is below.
vINV = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOders)
For I = 1 To 300
vINV.CardCode = "test"
vINV.Docdate = "2005/12/31"
vINV.DocDueDate = "2005/12/31"
vINV.NumAtCard = "test"
For J = 0 To 3
vINV.Lines.ItemCode = "test"
vINV.Lines.Quantity = 1
vINV.Lines.Price = 400
if J <> 3 Then
vINV.Lines.add()
End If
Next J
RetVal = vINV.Add
Next IHi Jiro,
I have never worked with this before, but maybe you can investigate using the DI Server. Search the forum for the DI Server. Herewith an extract from the DI Server help file:
<i>SAP Business One - Data Interface Server (DI Server) is a Component Object Model (COM) service running on a server that enables multiple clients to access and manipulate SAP Business One company database, using SOAP version 1.1 messages.
The DI Server uses the DI core to enable the same functionality provided by the DI API with the following advantages:
- Server architecture.
- <b>Improved performance.</b>
- Connection pooling mechanism.
- Generic interface.
The DI Server operates with SAP Business One application version 2004.</i>
Hope it helps,
Adele -
uname -a
SunOS ans7135 5.10 Generic_118822-02 sun4u sparc SUNW,UltraAX-i2
cc -V
cc: Sun C 5.6 Patch 117551-05 2005/05/10
I compiled XSLXPathSample.c with -xarch=v9 and LIB=-L$(TOP)/lib64 $(XDK_LIB) $(ORA_LIB) -ldl $(NET_LIB) -lm.
Purify found there is a lot of memery leak from XmlXPathCreateCtx().
There is no leak in 32 Bits.
Please help me to find out the reason.
Thank you very much.I encountered the same problems with binding date variables on Solaris. The SQLBindParamater would be successful for the date, but during the SQLExecute I always get this error:
ORA-01483: invalid length for DATE or NUMBER bind variable
I logged an official service request, and Oracle confirmed the problem. You can see it at bug 5241003. FYI, there is currently no estimated time for a fix. -
C++ sample code using XPATH
Need to navigate an XML and extract xml nodes using XPATH expressions in C++ Application.
Please send us a C++ code sample using Oracle 9.2.0.3 XPATH API functions to extract an XML using XPATH expression.
Thanks
ShivaHi,
Where i can find this path "$XDK_HOME\xdk\demo\c\xslt"
thanks in advance
shashi. -
Hi all,
I have an xml and i would like to do some query to the xml.
Is there any XPath API that i can use in java ?
Currently using 1.4.2
Is there any other recommendations?
ThanksXalan and Jaxen are two possibilities:
http://xml.apache.org/xalan-j/
http://jaxen.org/ -
Hi ,
Does Oracle 9.2.0 has XPATH API's?
I need to use XPATH to extract data from an XML document.
I searched over the net but I am not able to find usage of Oracle XPATH API's in c/c++ .
Can anybody please provide me a code sample to use Oracle 9.2.0 XPAPTH API's.
Thanks
MRAIn 10g, the sample code is included at:
$XDK_HOME\xdk\demo\c\xslt -
XPath Not Working (Namespace ?)
I am not receiving any errors, but similair XPath in XMLSpy works...
I have an XML document:
<Results>
<acc:Account xmlns:account="http://test/account" id="1">
<acc:Name>Account Name 1</acc:Name>
</acc:Account>
<acc:Account xmlns:account="http://test/account" id="2">
<acc:Name>Account Name 2</acc:Name>
</acc:Account>
</Results>
When I use: "//Results" I get a a Node back
When I use: //Results/acc:Account[@id=1], I get no results back and no errors
To avoid namespace problems I used a StaticNamespaceResolver...
My code:
HashMap prefixes = new HashMap(1);
String namespace = "http://test/account";
prefixes.put("acc", namespace);
try {
XObject obj = XPathAPI.eval(RootNode, queryStr, new StaticPrefixResolverImpl(prefixes));
NodeList nl = obj.nodelist();
System.out.println("NodeList Length: " + nl.getLength());
} catch (Exception ee) {
System.out.println(ee);
Thanks!Seems to me your problem is that you can't decide what prefix to use...
Is it 'acc' or 'account' ?
In your sample document, try:
<Results>
<acc:Account xmlns:acc="http://test/account" id="1">
<acc:Name>Account Name 1</acc:Name>
</acc:Account>
<acc:Account xmlns:acc="http://test/account" id="2">
<acc:Name>Account Name 2</acc:Name>
</acc:Account>
</Results>And see what the difference is...
Also, the prefix you use in your XPath expression does not have to be the same as the one used in the document. They are linked via the URI and a NamespaceContext. It's quite likely you'll need to implement a NamespaceContext (depending on what XPath API you are using).
-Rob -
Fastest method to load external data?
Hi,
Currently we load external xml file and parse it for our
internal use.
However, parsing take time, is it possible to reduce this
step?
Such as serialize / de-serialize?
thanks.Are you using Xpath API to parse your xml? This will help
some doing just queries but some parsing will still need to be
done.
Another solution is to not load xml but use Flash remoting.
Flash remoting is a binary format and much faster. WIth Flash
remoting you can pass all your items in the native formats defined
in PHP, ASP.Net, or ColdFusion.
Sean -
i am trying to create an e-learning course that will have
glossaries according to the various lessons that are within the
overall course. i have attached the code that i am using to quickly
switch out the glossary xml file (that contains the definitiosn and
terms). I can currently trace the lessonNumber variable (it is
reading "1"), but when I attempt to trace the glossaryText
variable, the output window is blank....can anyone tell me where i
am going wrong?Just a hint - perhaps try putting your onLoad declaration
BEFORE your load command. This way, your onload is present before
the load is issued, so in case the XML is loaded really quickly,
the onLoad handler will get called for sure. Does this make sense?
In your case, the XML may have already loaded before you tell the
object WHAT to call after it's loaded.
When I've used the xml object, it looks more like this:
myXML = new XML();
myXML.onLoad = someFunction;
myXml.load("somexmlfile.xml");
Also -afterwards, you have to select a node of the XML to
view. I use the XPath API to do so, by including this
import mx.xpath.XPathAPI;
And then using:
XPathAPI.selectSingleNode within an onLoad function. Take a
look at the documentation for XPathAPI - I had to make a custom
function to return the node I wanted.
Hope this helps you. -
Reading a XML file in a standalone java application
Hi,
What are my options if I have a standalone java application running outside any app. server and I need to read an XML file, probably read some of the attributes in the file...? Please explain clearly as I'm new to this. Appreciate your help.
Thanks,
Mahdadnope you don't need a DTD
you have to write your Java code in a way that doesn't rely too much on the structure:
- avoid getFirstChild().getFirstChild()... because you know that this element is first grandson of that element)
- prefer using getElementByTagName() or some XPath() API
but if the XML completely changes, well, yeah, you have to do some programmation: better think well your document structure in the beginning. -
Outlook 2013 crashed when user sending email from Adobe Writer xi pro ver 11.0.07
I ask Adobe, but they are signaling to Outlook problem
PC-HP, Windows 8.1 Pro X64 connected to Windows 2008 R2 DC
Adobe Acrobat Pro ver 11,x
When user trying to send email from Adobe direct, Outlook 2013 Pro is crashing
The only way to send email is to save adobe ( PDF) file and attached to the email
All patches are installedLog Name: Application
Source: Application Error
Date: 7/15/2014 8:05:38 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: Liz7PM-HP.armadale.local
Description:
Faulting application name: Acrobat.exe, version: 11.0.7.79, time stamp: 0x536b812b
Faulting module name: SendMail.api, version: 11.0.7.79, time stamp: 0x536b7fd0
Exception code: 0xc0000005
Fault offset: 0x0003390b
Faulting process id: 0x139c
Faulting application start time: 0x01cfa024deec4218
Faulting application path: C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe
Faulting module path: C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SendMail.api
Report Id: 553a89c7-0c18-11e4-be97-80c16ee27020
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-07-15T12:05:38.000000000Z" />
<EventRecordID>66128</EventRecordID>
<Channel>Application</Channel>
<Computer>Liz7PM-HP.armadale.local</Computer>
<Security />
</System>
<EventData>
<Data>Acrobat.exe</Data>
<Data>11.0.7.79</Data>
<Data>536b812b</Data>
<Data>SendMail.api</Data>
<Data>11.0.7.79</Data>
<Data>536b7fd0</Data>
<Data>c0000005</Data>
<Data>0003390b</Data>
<Data>139c</Data>
<Data>01cfa024deec4218</Data>
<Data>C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe</Data>
<Data>C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SendMail.api</Data>
<Data>553a89c7-0c18-11e4-be97-80c16ee27020</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Log Name: Application
Source: Windows Error Reporting
Date: 7/15/2014 8:05:55 AM
Event ID: 1001
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: Liz7PM-HP.armadale.local
Description:
Fault bucket 73304412188, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: Acrobat.exe
P2: 11.0.7.79
P3: 536b812b
P4: SendMail.api
P5: 11.0.7.79
P6: 536b7fd0
P7: c0000005
P8: 0003390b
P9:
P10:
Attached files:
C:\Users\ewhitton\Desktop\140.pdf
C:\Users\ewhitton\AppData\Local\Temp\WER8000.tmp.WERInternalMetadata.xml
C:\Users\ewhitton\AppData\Local\Temp\WER8BB9.tmp.appcompat.txt
minidump.mdmp
These files may be available here:
C:\Users\ewhitton\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Acrobat.exe_2a26ba191a528da71b85271ed9509f7e426babf8_0d6f35c4_1735c074
Analysis symbol:
Rechecking for solution: 0
Report Id: 553a89c7-0c18-11e4-be97-80c16ee27020
Report Status: 4104
Hashed bucket: f6a7a946597169e4aea5077b3b7f0848
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-07-15T12:05:55.000000000Z" />
<EventRecordID>66131</EventRecordID>
<Channel>Application</Channel>
<Computer>Liz7PM-HP.armadale.local</Computer>
<Security />
</System>
<EventData>
<Data>73304412188</Data>
<Data>1</Data>
<Data>APPCRASH</Data>
<Data>Not available</Data>
<Data>0</Data>
<Data>Acrobat.exe</Data>
<Data>11.0.7.79</Data>
<Data>536b812b</Data>
<Data>SendMail.api</Data>
<Data>11.0.7.79</Data>
<Data>536b7fd0</Data>
<Data>c0000005</Data>
<Data>0003390b</Data>
<Data>
</Data>
<Data>
</Data>
<Data>
C:\Users\ewhitton\Desktop\140.pdf
C:\Users\ewhitton\AppData\Local\Temp\WER8000.tmp.WERInternalMetadata.xml
C:\Users\ewhitton\AppData\Local\Temp\WER8BB9.tmp.appcompat.txt
minidump.mdmp</Data>
<Data>C:\Users\ewhitton\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Acrobat.exe_2a26ba191a528da71b85271ed9509f7e426babf8_0d6f35c4_1735c074</Data>
<Data>
</Data>
<Data>0</Data>
<Data>553a89c7-0c18-11e4-be97-80c16ee27020</Data>
<Data>4104</Data>
<Data>f6a7a946597169e4aea5077b3b7f0848</Data>
</EventData>
</Event>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Log Name: Application
Source: Outlook
Date: 7/15/2014 8:06:05 AM
Event ID: 50
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: Liz7PM-HP.armadale.local
Description:
The following providers do not implement fast shutdown APIs, but are being shut down using fast shutdown:
MDConnector.dll (MAPI Store Provider)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Outlook" />
<EventID Qualifiers="16384">50</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-07-15T12:06:05.000000000Z" />
<EventRecordID>66132</EventRecordID>
<Channel>Application</Channel>
<Computer>Liz7PM-HP.armadale.local</Computer>
<Security />
</System>
<EventData>
<Data>MDConnector.dll (MAPI Store Provider)
</Data>
</EventData>
</Event> -
Urgent help for processing XML stream read from a JAR file
Hi, everyone,
Urgently need your help!
I am reading an XML config file from a jar file. It can print out the result well when I use the following code:
===============================================
InputStream is = getClass().getResourceAsStream("conf/config.xml");
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line); // It works fine here, which means that the inputstream is correct
// process the XML stream I read from above
NodeIterator ni = processXPath("//grid/gridinfo", is);
Below is the processXPath() function I have written:
public static NodeIterator processXPath(String xpath, InputStream byteStream) throws Exception {
// Set up a DOM tree to query.
InputSource in = new InputSource(byteStream);
DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
dfactory.setNamespaceAware(true);
Document doc = dfactory.newDocumentBuilder().parse(in);
// Use the simple XPath API to select a nodeIterator.
System.out.println("Querying DOM using " + xpath);
NodeIterator ni = XPathAPI.selectNodeIterator(doc, xpath);
return ni;
It gives me so much errors:
org.xml.sax.SAXParseException: The root element is required in a well-formed doc
ument.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:570)
at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endO
fInput(XMLDocumentScanner.java:790)
at org.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocument
Scanner.java:418)
at org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifi
cations(XMLValidator.java:712)
at org.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultE
ntityHandler.java:1031)
at org.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityRead
er.java:168)
at org.apache.xerces.readers.UTF8Reader.changeReaders(UTF8Reader.java:18
2)
at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java:19
7)
at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
atch(XMLDocumentScanner.java:686)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
java:195)
at processXPath(Unknown Source)
Thank you very much!
Sincerely Yours
Davidorg.xml.sax.SAXParseException: The root element is required in a well-formed document.This often means that the parser can't find the document. You think it should be able to find the document because your test code could. However if your test code was not in the same package as your real (failing) code, your test is no good because getResourceAsStream("conf/config.xml") is looking for that file name relative to the package of the class that contains that line of code.
If your test code wasn't in any package, put a slash before the filename and see if that works.
Maybe you are looking for
-
Drop calls at our home in The Villages, Fl
Recently relocated from one home to another in the Villages, Fl and seems our cell phone get drop calls and people saying they can't hear us...if we go outside it doesn't seem to happen as often..I called Verizon and they recently told me to hit ###
-
When to use servlets and jsp in an application like shoping cart?
Hi All I m going to design and implement a web application using servelts and jsp. I am still at its requirements analyze stage. The application is almost likely a shopping cart. So if any of you have the deep knowledge about this domain with servlet
-
RAW support in iPhoto 8/Leopard
Does anyone know if Apple added support for any new digital cameras in iPhoto 8/Leopard? I'm planning on buying an Olympus E-410 soon and would like to know if iPhoto will understand and display the RAW files it produces. Does anyone have experience
-
How can i maintain conditions for vendor sub-ranges
Hi All, How can i maintain conditions for vendor sub-ranges. These conditions apply to all materials from vendor's sub-range. Eg: vendor X has the two subranges R1 & R2. I want to maintain separate conditions for R1 & R2. When ever i created PO with
-
Compaq CQ61-360sa Laptop Hard Drive spin speed? 5400 or 7200?
Compaq/HP websit states 7200 rpm Comet website states 7200 rpm Comet confirm 7200 rpm on this page: Comet Q&A page but . . . . . the Compaq box the laptop comes in from Comet states 5400 rpm ! Who tells the truth? is there some way of telling on the