Hi,
I have the following code to validate an xml document with an xml schema(please refer below). It's giving an error:
Please help!
Thanks,
Tina
Error
--------------------------------------------
57 cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
58: cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
59: cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
60: cannot find symbol symbol : method setProperty(java.lang.String,java.lang.String)
location: class org.jdom.input.SAXBuilder
builder.setProperty("
java file
--------------------
import org.jdom.* ;
import org.jdom.input.*;
import org.jdom.output.* ;
import org.jdom.xpath.*;
import java.util.regex.*;
import java.util.*;
import java.io.*;
public wc
{
SAXBuilder builder = new SAXBuilder();
builder.setFeature(" true);
builder.setFeature(" true);
builder.setFeature(" true);
builder.setProperty("
Document doc = builder.build(new File("C:\\myJavaStuff\\ISE\\programming\\ise_3_1.xml"));
}
---------------------------------------------------------
xml file
-----------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:Schedules xmlns:ns1=" xmlns:ns2=" xmlns:ns3=" xmlns:ns4="<ns2:Schedule ReasonCode="M">
<ns2:OrganizationAgencyName>AB</ns2:OrganizationAgencyName>
<ns3:OrganizationBranchName>Newport</ns3:OrganizationBranchName>
<ns3:IdentificationID>bfletcher</ns3:IdentificationID>
<ns3ersonGivenName>Ben</ns3ersonGivenName>
<ns3ersonMiddleName>Anton</ns3ersonMiddleName>
<ns3ersonSurName>Fletcher</ns3ersonSurName>
<ns2:StartDate>2008-05-26-07:00</ns2:StartDate>
<ns2:EndDate>2008-06-01-07:00</ns2:EndDate>
</ns2:Schedule>
<ns2:Schedule ReasonCode="T">
<ns2:OrganizationAgencyName>AB</ns2:OrganizationAgencyName>
<ns3:OrganizationBranchName>Newport Beach</ns3:OrganizationBranchName>
<ns3:IdentificationID>opearson</ns3:IdentificationID>
<ns3ersonGivenName>Oscar</ns3ersonGivenName>
<ns3ersonMiddleName></ns3ersonMiddleName>
<ns3ersonSurName>Pearson</ns3ersonSurName>
<ns2:StartDate>2008-06-02-07:00</ns2:StartDate>
<ns2:EndDate>2008-06-08-07:00</ns2:EndDate>
</ns2:Schedule>
</ns2:Schedules>
I have the following code to validate an xml document with an xml schema(please refer below). It's giving an error:
Please help!
Thanks,
Tina
Error
--------------------------------------------
57 cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
58: cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
59: cannot find symbol symbol : method setFeature(java.lang.String,boolean)
location: class org.jdom.input.SAXBuilder
builder.setFeature(" true);
60: cannot find symbol symbol : method setProperty(java.lang.String,java.lang.String)
location: class org.jdom.input.SAXBuilder
builder.setProperty("
java file
--------------------
import org.jdom.* ;
import org.jdom.input.*;
import org.jdom.output.* ;
import org.jdom.xpath.*;
import java.util.regex.*;
import java.util.*;
import java.io.*;
public wc
{
SAXBuilder builder = new SAXBuilder();
builder.setFeature(" true);
builder.setFeature(" true);
builder.setFeature(" true);
builder.setProperty("
Document doc = builder.build(new File("C:\\myJavaStuff\\ISE\\programming\\ise_3_1.xml"));
}
---------------------------------------------------------
xml file
-----------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:Schedules xmlns:ns1=" xmlns:ns2=" xmlns:ns3=" xmlns:ns4="<ns2:Schedule ReasonCode="M">
<ns2:OrganizationAgencyName>AB</ns2:OrganizationAgencyName>
<ns3:OrganizationBranchName>Newport</ns3:OrganizationBranchName>
<ns3:IdentificationID>bfletcher</ns3:IdentificationID>
<ns3ersonGivenName>Ben</ns3ersonGivenName>
<ns3ersonMiddleName>Anton</ns3ersonMiddleName>
<ns3ersonSurName>Fletcher</ns3ersonSurName>
<ns2:StartDate>2008-05-26-07:00</ns2:StartDate>
<ns2:EndDate>2008-06-01-07:00</ns2:EndDate>
</ns2:Schedule>
<ns2:Schedule ReasonCode="T">
<ns2:OrganizationAgencyName>AB</ns2:OrganizationAgencyName>
<ns3:OrganizationBranchName>Newport Beach</ns3:OrganizationBranchName>
<ns3:IdentificationID>opearson</ns3:IdentificationID>
<ns3ersonGivenName>Oscar</ns3ersonGivenName>
<ns3ersonMiddleName></ns3ersonMiddleName>
<ns3ersonSurName>Pearson</ns3ersonSurName>
<ns2:StartDate>2008-06-02-07:00</ns2:StartDate>
<ns2:EndDate>2008-06-08-07:00</ns2:EndDate>
</ns2:Schedule>
</ns2:Schedules>