Sorry to repost. Just thought someone under advanced could help me a little more :D
I'm trying to pull calendar events from my school website. I can pull the xml file but im having trouble parsing it. The site is using dotcms and the xml file is more like a dictionary. Here is my query for the file: http://new.ipfw.edu/JSONContent/?typ...y=modDate+desc
I'm having trouble pulling out info such as the event title and date because instead of it being formatted <Title>"Actual Title"</Title> it is all set up as <String>Title</String> <String>"Actual Title"</String>. I was using sax parser but to no avail. All the headers either say entry or string. Any help would be appreciated. Am i even going about this the right way? Thanks in advance.

To make it a little clearer I am using SAX parser with "public void characters (char ch[], int start, int length)" and "public void startElement (String name, AttributeList attrs)" the startElement method only pulls the items in <> so it is not useful (only pulls string or entry) and the characters method will pull one character at a time and that is a pain to compare to an entire word...

This is just the minimum of my parsing class:

import java.io.IOException;
import java.util.ArrayList;

import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;



public class parserXML extends DefaultHandler
{
private String tempVal;
private ArrayList<CalendarEvent> CalendarEvent = new ArrayList<CalendarEvent>();
private CalendarEvent tempEvent;
private int operator;
public parserXML(ArrayList<CalendarEvent> CalendarEvent)
{
this.CalendarEvent = CalendarEvent;
operator=0;
parseDocument();
}
private void parseDocument()
{
SAXParserFactory spf = SAXParserFactory.newInstance();
try{
SAXParser sp = spf.newSAXParser();
sp.parse("calendarEvents.xml", this);
}catch(SAXException se) {
se.printStackTrace();
}catch(ParserConfigurationException pce) {
pce.printStackTrace();
}catch(IOException ie) {
ie.printStackTrace();
}
}

// Event Handlers
public void startDocument ()
{
System.out.println("Start document");
}



public void characters (char ch[], int start, int length)
{
for (int i = start; i < start + length; i++)
{
}
}