Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jdom xml schema validation

Status
Not open for further replies.

tinac99

Programmer
Jan 17, 2002
58
US
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>
<ns3:personGivenName>Ben</ns3:personGivenName>
<ns3:personMiddleName>Anton</ns3:personMiddleName>
<ns3:personSurName>Fletcher</ns3:personSurName>
<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>
<ns3:personGivenName>Oscar</ns3:personGivenName>
<ns3:personMiddleName></ns3:personMiddleName>
<ns3:personSurName>Pearson</ns3:personSurName>
<ns2:StartDate>2008-06-02-07:00</ns2:StartDate>
<ns2:EndDate>2008-06-08-07:00</ns2:EndDate>
</ns2:Schedule>
</ns2:Schedules>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top