Win a copy of Rust Web Development this week in the Other Languages forum!

Rajab Davudov

Greenhorn
+ Follow
since Apr 30, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajab Davudov

Hi all,
We are using Websphere 5.1 with oracle 9i. Now we updated oracle to 10g.
What kind of changes do I need to do on websphere to support it ?

- First, I need to use odbc14.jar instead of classes12.zip.
and ...

thanks in advance
13 years ago
Thats right for implementation part. And I guess for db part
if it is Set hibernate puts some constraints to avoid duplicity automatically.

thank you very much.
Hi,

I am new at hibernate. I want to ask what is there difference between using
Set<Worker> and List<Worker> in hibernate by implementation and by db structure. In Tutorials Set is mostly used, why ?

Thanks,
Thanks, I have already registered for last day 30th April.
I hope I will pass it
Hi everybody,

I have a voucher and it expires in two days (30/04/2008). And I plan to take SCJP 1.5 in two weeks. Can I just schedule exam before voucher expires but take exam after voucher expires ? I guess voucher is only for registration so it shouldnt affect my exam date.

urgent response is appreciated.
thanks
Hi,

I have to call a webservice and add a data source. But I have only byte[].
As far as I know i can add FileDataSource and URLDataSource. But I have only byte[]. And I dont want to write this byte[] into file and add that file as FileDataSource.

Any ideas how I can do this.

Thanks in advance,
14 years ago
I have already written a handler class. And it seems working. Here is the java source. thanks for help. It was not so hard

import java.util.ArrayList;
import java.util.HashMap;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class MuyapHandler extends DefaultHandler {

private String item = null ;
private String performerId = null ;
private HashMap performerMap = new HashMap() ;
private ArrayList songList = new ArrayList() ;
private String[] values = null ;
private int index = -1 ;

public void startDocument() throws SAXException {
performerMap = new HashMap() ;
songList = new ArrayList() ;
item = null ;
performerId = null ;
values = null ;
index = -1 ;
}

public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (qName.equals("song")) {
String songID = attributes.getValue("songID") ;
values = new String[5] ;
values[0] = songID ;
} else if (qName.equals("songName")) {
item = "songName" ;
index = 1 ;
} else if (qName.equals("songPerformerID")) {
item = "songPerformerID" ;
index = 2 ;
} else if (qName.equals("producer")) {
item = "producer" ;
index = 3 ;
} else if (qName.equals("label")) {
item = "label" ;
index = 4 ;
} else if (qName.equals("performerDisplay")) {
performerId = attributes.getValue("performerDisplayID") ;
}
super.startElement(uri, localName, qName, attributes);
}

public void endElement(String uri, String localName, String qName) throws SAXException {
if (qName.equals("song")) {
songList.add(values) ;
}
super.endElement(uri, localName, qName) ;
}

public void characters(char[] ch, int start, int length) throws SAXException {
if (item != null) {
if (item.equals("songPerformerID")) {
values[index] = (String) performerMap.get(new String(ch, start, length)) ;
} else {
values[index] = new String(ch, start, length) ;
}
item = null ;
} else if (performerId != null) {
String performerName = new String(ch, start, length) ;
performerMap.put(performerId, performerName) ;
performerId = null ;
}
}

public ArrayList getSongList() {
return songList;
}

}
Can I read data from "internal form" or I still have to use DOM kind of things ?
I need only to read data from xml not to manipulate. Therefore, I have to use SAX Parser and also write these handler classes. Is that right ?
I am using JDOM because it is easy and it is the only parser I have ever used.
I need to extract values from some tags and create an excel file.

Someone suggested me to use Xerces, but I don't want to write handler classes. It would be simple something like jdom where you use getElement() kind methods...
Hi all,

I am using JDOM to parse a 100mb xml file. But I am getting outofmemory error even i specify jvm -Xmx1024m parameter. What else can I use to parse it ?

thanks in advance