RE: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Soosai, Lourdhu Vasanth
hi hart, put ur code inside jsp declaration with static instances. <% for(int i=0;i hope this helps vasanth ct-usa -Original Message- From: Cameron Hart [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2003 6:25 PM To: [EMA

Re: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Cameron Hart
I was thinking creating a Parser Pool would be a good idea. Does anyone know of any examples of creating a DOMParser Pool? The load on our production server is around 10 page requests a second at max load, the problem is more pronounced on our production code. To easily demonstrate what is happeni

Re: build falis for xerces2-j while creating dom3-jars

2003-03-19 Thread Neil Graham
Hi Rajat, I conjecture that you're using Sun JDK 1.4.x? I was able to verify the problem there; it should be fixed in CVS now. FYI, the problem boils down to the API's shipped with the JDK and the difficulty of overriding them. Hope that helps! Neil Neil Graham XML Parser Development IBM Toront

Re: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Sandy Gao
So you are creating 10 (or 200?) parsers every second? As you can imagine, creating new parsers is really expensive. Is it possible for you to cache the parser created by the previous JSP invocation? (Implementing a parser pool, for example.) Thanks, Sandy Gao Software Developer, IBM Canada (1-905

Re: Code that throws the NullPointer

2003-03-19 Thread Elena Litani
Kirsten Barber wrote: > I have a Java class that manipulates the XMLDocument that I am using in a > series of Java servlets. Below is a part of the code, specifically the > method that is throwing the nullpointer exception. I have taken out some > comments, but I have already verified that the va

Re: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Cameron Hart
I just checked. I was definetly getting the problem with Xerces-J 2.3.0. Perhaps I should file this as a bug? >>> [EMAIL PROTECTED] 19/03/2003 6:25:45 p.m. >>> Cameron Hart wrote: >I'm running a servlet under tomcat that DOM parses a couple of xml docs, >grabs relevant nodes and serializes the

Re: build falis for xerces2-j while creating dom3-jars

2003-03-19 Thread RAJAT PANT
I did execute build clean before building dom3-jars. I think I am doing everything correct to build jars-dom3 as far as i can forsee. to refresh: I am trying to build jars-dom3 from CVS source code. The attempt is failing as it cannot build samples-dom3 jars, since it does not recognize methods

Re: build falis for xerces2-j while creating dom3-jars

2003-03-19 Thread Elena Litani
RAJAT PANT wrote: > I have been trying to access dom3 funtionality by extracting the source code > of xerces2 from CVS and building it with target jars-dom3 > > it creates the dom3-xerces jars and dom3-api jars but it > does not recognizes any of dom3 methods like document.normalizeDocument() > wh

Re: Parsing CDATA sections

2003-03-19 Thread Elena Litani
Mark Kurley wrote: > When parsing XML documents with large CDATA sections I notice that it takes > an extremely long time. The latest code in CVS includes a patch to the scanner that should make parsing of CDATA sections faster. It is possible that we should also try to improve the DOMParser ha

RE: Parsing CDATA sections

2003-03-19 Thread Carr, Steven (IndSys, GEFanuc, TCP)
If you look at the parser code of Xerces, you'll see some fancy stuff for parsing large Text nodes. Unfortunately, for reasons unknown to me, this same code was not used for CData section parsing. The fix is rather simple, imho. Here is an example of how you can fix it. Create a new "MyParser" t

Re: Load Schemas using HTTPS as URI

2003-03-19 Thread Neeraj Bajaj
[EMAIL PROTECTED] wrote: Hi Is it possible to use a https uri like "https://xyz/schema.xsd"; to specify the schemaLocation in a xml document. I am using (Xerces 2.0.0 ) to parse the document. Is there any setting in Xerces to make it understand https urls for schemaLocation. This is interesting.

Re: Load Schemas using HTTPS as URI

2003-03-19 Thread KAtigre
Hi Just so to help anyone else, having similar problem, I finally found out that, the problem had nothing to do with xerces parser.It was a purely java, thing. Basically, in order for the java 1.4.1_01 to access https urls , you need to import the certificate used by the https server into the ca

Parsing CDATA sections

2003-03-19 Thread Mark Kurley
When parsing XML documents with large CDATA sections I notice that it takes an extremely long time. (IE: 1 mb XML doc takes 4 minutes) With our latest software release we upgraded to Xerces 2.2.0 from 1.2.1. I ran some test with the old parser and it takes 5 seconds to parse the same document.

Re: XHTML Output Format

2003-03-19 Thread Cameron Hart
> Until today, I was using the Method.HTML output format. I tried to > switch to Method.HTML, but since the script tags are not serialized > as CDATA (I have lots of inline dynamic scripts), it makes it > unusable. This behaviour is correct to the XML spec, but unfortunately doesn't work in any w

Re: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Cameron Hart
> > Is this a problem with Xerces? > > > Can you tell which version of Xerces is being used ? > > thanks, > Neeraj Our production machine that we first noticed the problem on is running 2.3.0. I'm not sure if I upgraded the machine I was running this jsp test case om. It is either the version tha

Re: Xerces-2 DOMParser bottleneck

2003-03-19 Thread Neeraj Bajaj
Cameron Hart wrote: I'm running a servlet under tomcat that DOM parses a couple of xml docs, grabs relevant nodes and serializes the new doc into xhtml output. I have found a bottleneck (or deadlock?) when the servlet is under load. The bottleneck can easily be demonstrated by running a lo

Re: Whitespaces

2003-03-19 Thread Neeraj Bajaj
Sudha Sathiaseelan wrote: Hi all, Is there a known way to ignore whitespace when loading an xml document through DocumentBuilderFactoryImpl? Set DocumentBuilderFactory#setIgnoringElementContentWhitespace(boolean) to true. You should note that this feature works only when element content

Xerces-2 DOMParser bottleneck

2003-03-19 Thread Cameron Hart
I'm running a servlet under tomcat that DOM parses a couple of xml docs, grabs relevant nodes and serializes the new doc into xhtml output. I have found a bottleneck (or deadlock?) when the servlet is under load. The bottleneck can easily be demonstrated by running a load test against the attached

build falis for xerces2-j while creating dom3-jars

2003-03-19 Thread RAJAT PANT
I hava a question. I have been trying to access dom3 funtionality by extracting the source code of xerces2 from CVS and building it with target jars-dom3 it creates the dom3-xerces jars and dom3-api jars but it does not recognizes any of dom3 methods like document.normalizeDocument() when it tri