: Xerces-J 2.3.0 now available 2003-01-31 - By Soosai, Lourdhu Vasanth
hi joe, i want to discard the old value without looking at it. whever i c a <name> testname</name> i like to change the value <name> joe<name> should i use XNI? appreciate ur sugestions.
thx vasanth
-----Original Message----- From: Joseph Kesselman [mailto:keshlam@(protected)] Sent: Friday, January 31, 2003 10:04 AM To: xerces-j-user@(protected) Subject: Re: [ANNOUNCEMENT]: Xerces-J 2.3.0 now available
> how can i change the characters value while parsing using SAX > <name > nameOne</name> > how would i change it to > <name > nameTwo</name> > without really constructing a string buffer.
If you want to discard the old value without looking at it, you could do that without constructing a buffer.
If you want to find out whether the value was nameOne before changing it to nameTwo, you may need a buffer. As Andy pointed out, you may get the data as two separate events; if the first contains "nam", you don't know whether that will be followed by "eOne"... or "eO" and "ne", for that matter.
You *might* be able to do something based on recording how many characters matched the programmed constant before a mismatch was found, and re-issue them from the constant rather than from the input. This would avoid buffering. It would also yield fairly ugly code, especially if there are several values you're looking for and particularly if some of them start with the same substring. If you've run serious performance tests and know that buffering is a major bottleneck (unlikely!), you could try this approach and see if it helps (also unlikely!).
______________________________________ Joe Kesselman / IBM Research
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|