类之间数据传递,A类获取B类失去的数据,分少多担待

类之间数据传递,A类获取B类得到的数据,分少多担待
最近在做xml解析的时候需要把不同标签下的数据分别存入不同的数据库表中,A类用于存储数据,调用了B类中的解析方法,B类用于解析xml文件。
现在B类可以解析数据,但是A类不知道如何去获取B中解析的数据,并将其储存到数据库表中
具体代码如下,希望各位能告诉我如何去做
A类,用于上传文件,解压文件,解析xml
public class AddResourceAction extends HibernateAction {
// 封装文件标题请求参数的属性

/**
 * 
 */
private static final long serialVersionUID = 1L;
Scorm s = new Scorm();

public Scorm getS() {
return s;
}

public void setS(Scorm s) {
this.s = s;
}

// 封装上传文件域的属性
private File upload;
// 封装上传文件类型的属性
private String uploadContentType;
// 封装上传文件名的属性
private String uploadFileName;

// 直接在struts.xml文件中配置的属性
public File getUpload() {
return upload;
}

public void setUpload(File upload) {
this.upload = upload;
}

public String getUploadContentType() {
return uploadContentType;
}

public void setUploadContentType(String uploadContentType) {
this.uploadContentType = uploadContentType;
}

public String getUploadFileName() {
return uploadFileName;
}

public void setUploadFileName(String uploadFileName) {
this.uploadFileName = uploadFileName;
}

public String execute() throws Exception {
Account me = (Account) ActionContext.getContext().getSession()
.get(R.account);

s.setTime(new Date());
s.setAccount(me);
h().save(s);
if (getUpload() != null) {

String filepath = me.getId() + "\\sco" + s.getId() + "\\"
+ getUploadFileName();
String realPath = DownUtil.getSavePath() + "\\" + filepath;

// 以服务器的文件保存地址和原文件名建立上传文件输出流
String dir = DownUtil.getSavePath() + "\\" + me.getId() + "\\sco"
+ s.getId();
DownUtil.mkdirs(dir);
String path = DownUtil.getSavePath() + "\\" + me.getId();
FileOutputStream fos = new FileOutputStream(realPath);
FileInputStream fis = new FileInputStream(getUpload());
byte[] buffer = new byte[1024];
int len = 0;
while ((len = fis.read(buffer)) > 0) {
fos.write(buffer, 0, len);
}
fos.close();

Resource res = new Resource();
res.setScorm(s);
res.setFilepath(filepath);
h().save(res);

saveScormData(realPath, dir, res);
}
addActionMessage("成功上传资源");
return SUCCESS;
}

private void saveScormData(String realPath, String dir, Resource res) {
if (h().save(res) != null) {

try {
System.out.println(realPath);
System.out.println(dir);

String filePath = realPath.replaceAll("\\\\", "/");
String fileDir = dir.replaceAll("\\\\", "/") + "/";
System.out.println(filePath);
System.out.println(fileDir);

ZipFiles zip = new ZipFiles();
zip.unZipFiles(filePath, fileDir);

String fileName = getUploadFileName().substring(0,
getUploadFileName().lastIndexOf("."));
String xmlDir = (fileDir + fileName + "\\imsmanifest.xml")
.replaceAll("\\\\", "/");
ScormParser scormParser = new ScormParser();
scormParser.parse(xmlDir);
                                } catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
======================================================================================
B类 用于解析xml
public class ScormParser {

/*
 * public static void main(String[] a) {
 * 
 * Scorm scorm = ScormParser
 * .parse("C:/Users/Alex/Desktop/scorm资料/scorm/imsmanifest.xml"); //
 * scorm.getScoOrgSets(); scorm.getScoResSets(); //
 * System.out.println(scorm.getTitle());
 * 
 * }
 */

public static Scorm parse(String zipPath) {
Scorm scorm = new Scorm();

File file = new File(zipPath);
InputStream is = null;
try {
is = new FileInputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}

XmlRead xmlRead = new XmlRead();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder;
try {
builder = factory.newDocumentBuilder();