Hi,
I have the following xml file:
xml filename: ise_1.xml
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<UnavailableSchedules>
<UnavailableSchedule ReasonCode="V">
<OrganizationAgencyName>ANAHEIM POLICE DEPT.</OrganizationAgencyName>
<IdentificationID>#1</IdentificationID>
<PersonGivenName>NANCY</PersonGivenName>
<PersonSurName>CARPIO</PersonSurName>
<StartDate>05/1/2008</StartDate>
<EndDate>2008-05-02</EndDate>
</UnavailableSchedule>
</UnavailableSchedules>
In my java file, I have:
import org.jdom.* ;
import org.jdom.input.*;
import org.jdom.output.* ;
import java.io.Reader;
import java.io.StringReader;
import java.util.*;
import java.io.*;
import java.io.InputStream;
public class OfficerUnavailabilityWebServiceClient
{
public static void run(StringBuilder sb)
{
try
{
SAXBuilder builder = new SAXBuilder(true);
Document doc = builder.build(new File("C:\\ise_1.xml"));
Element root = doc.getRootElement();
}
catch (Throwable t)
{
System.out.print("inside catch Throwable:" + t );
}
}
}
----------------------------------
The code is generating an error on the build, stating:
inside catch Throwable: org.jdom.JDOMException: Error on line 2 of doucment file:/C:/ise_1.xml: Element type "UnavailableSchedules" is not declared.
I'm using Java 1.6 and Eclipse 3.1.2.
Please help.
I have the following xml file:
xml filename: ise_1.xml
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<UnavailableSchedules>
<UnavailableSchedule ReasonCode="V">
<OrganizationAgencyName>ANAHEIM POLICE DEPT.</OrganizationAgencyName>
<IdentificationID>#1</IdentificationID>
<PersonGivenName>NANCY</PersonGivenName>
<PersonSurName>CARPIO</PersonSurName>
<StartDate>05/1/2008</StartDate>
<EndDate>2008-05-02</EndDate>
</UnavailableSchedule>
</UnavailableSchedules>
In my java file, I have:
import org.jdom.* ;
import org.jdom.input.*;
import org.jdom.output.* ;
import java.io.Reader;
import java.io.StringReader;
import java.util.*;
import java.io.*;
import java.io.InputStream;
public class OfficerUnavailabilityWebServiceClient
{
public static void run(StringBuilder sb)
{
try
{
SAXBuilder builder = new SAXBuilder(true);
Document doc = builder.build(new File("C:\\ise_1.xml"));
Element root = doc.getRootElement();
}
catch (Throwable t)
{
System.out.print("inside catch Throwable:" + t );
}
}
}
----------------------------------
The code is generating an error on the build, stating:
inside catch Throwable: org.jdom.JDOMException: Error on line 2 of doucment file:/C:/ise_1.xml: Element type "UnavailableSchedules" is not declared.
I'm using Java 1.6 and Eclipse 3.1.2.
Please help.