• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

IBM and JAXP

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How Can i configure JAXP's SAXParserFactory class to use IBM's parser with ?
Which parsers other than Xerces provide plugablity into JAXP?

Thanx,
Amit

------------------
Sun Certified Java Programmer for Java 2 Programming
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The System class maintains a set of properties, key/value pairs, that define traits or attributes of the current working environment. When the runtime system first starts up, the system properties are initialized to contain information about the runtime environment. including information about the current user, the current version of the Java runtime, and even the character used to separate components of a filename.
Checkout Java Tutorial section on System properties for an excellent introduction to how and when the properites can be used.
JAXP uses "org.xml.sax.parser" as key for SAX Parser class name.
You can use the System properties to tell JAXP to use a specific SAX/DOM parser. You can either tweak the properties file externally or inside your program. Here's an example -
System.setProperty ("org.xml.sax.parser","<QualifiedpathToYourParser>");
Hope that helps!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Amit Ganatra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ajith Kallambella:
The System class maintains a set of properties, key/value pairs, that define traits or attributes of the current working environment. When the runtime system first starts up, the system properties are initialized to contain information about the runtime environment. including information about the current user, the current version of the Java runtime, and even the character used to separate components of a filename.
Checkout Java Tutorial section on System properties for an excellent introduction to how and when the properites can be used.
JAXP uses "org.xml.sax.parser" as key for SAX Parser class name.
You can use the System properties to tell JAXP to use a specific SAX/DOM parser. You can either tweak the properties file externally or inside your program. Here's an example -
[b]System.setProperty ("org.xml.sax.parser","<QualifiedpathToYourParser>");

Hope that helps!
[/B]


 
Amit Ganatra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ajith,
The solution which u have mentioned works. I am reading a book which mentioned abt plugablity of Parsers into Jaxp by using Factories i.e. each vendor specific Parser that u wanna plug into JAXP should have a special Factory class and i need to have a special JAXP pacakage in that vendor specific parser....and as of now only xerces has that JAXP plugablity. I never this soln existed.
Where can I find the documentation for this plugablity options. I just wanna preserve it for future use.
Thanx for ur help..
amit

Originally posted by Ajith Kallambella:
The System class maintains a set of properties, key/value pairs, that define traits or attributes of the current working environment. When the runtime system first starts up, the system properties are initialized to contain information about the runtime environment. including information about the current user, the current version of the Java runtime, and even the character used to separate components of a filename.
Checkout Java Tutorial section on System properties for an excellent introduction to how and when the properites can be used.
JAXP uses "org.xml.sax.parser" as key for SAX Parser class name.
You can use the System properties to tell JAXP to use a specific SAX/DOM parser. You can either tweak the properties file externally or inside your program. Here's an example -
[b]System.setProperty ("org.xml.sax.parser","<QualifiedpathToYourParser>");

Hope that helps!
[/B]


 
reply
    Bookmark Topic Watch Topic
  • New Topic