DOM and SAX both working
git-svn-id: svn://anubis/gvsu@125 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
437e070896
commit
2d6b0e7997
@ -79,19 +79,32 @@ public class JSAX extends DefaultHandler
|
||||
System.out.print(m_weekDayNames.get(qName));
|
||||
System.out.print("</td>");
|
||||
}
|
||||
else if (qName.equals("am"))
|
||||
else if (qName.equals("am") || qName.equals("pm"))
|
||||
{
|
||||
System.out.print("<td>");
|
||||
m_displayText = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void endElement(String uri, String localname, String qName)
|
||||
{
|
||||
if (
|
||||
if (m_weekDayNames.containsKey(qName))
|
||||
{
|
||||
System.out.println("</tr>");
|
||||
}
|
||||
else if (qName.equals("am") || qName.equals("pm"))
|
||||
{
|
||||
System.out.print("</td>");
|
||||
m_displayText = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void characters(char ch[], int start, int length)
|
||||
{
|
||||
if (m_displayText)
|
||||
{
|
||||
String content = new String(ch, start, length).trim();
|
||||
System.out.println("characters: " + content);
|
||||
System.out.print(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user