• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

document validation -JAXP

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay .....i have a document, i have inserted a few values into a few of its nodes, and now i wanna validate that document. I am using JAXP....IN jaxp i dont see a way to validate a document
the only way i see is to use a document builder and validate it
like this
docBuilderFactory.setValidating(validation);
Document doc = null;
try {
doc = docBuilder.parse(new File(filename));
} catch (SAXException se) {
System.err.println(se.getMessage());
System.exit(1);
} catch (IOException ioe) {
System.err.println(ioe);
System.exit(1);
}
but i already have a parsed document, i wanna validate this document, how can i achieve this...thanks in advance
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If you are parsing the document which parser are you using?
If it is a validating parser then why you want to validate that one once again?.
Won't it be a overhead?
If you have any such requirement please let me know...
regards
Sateesh
reply
    Bookmark Topic Watch Topic
  • New Topic