Results 1 to 5 of 5

Thread: How to use the system id in the xml definition file?

  1. #1
    Join Date
    Sep 2004
    Posts
    6

    Default How to use the system id in the xml definition file?

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <!--DOCTYPE beans SYSTEM "spring-beans.dtd"-->
    <beans>
    </beans>

    -------------------------------------
    I just want to use the system doctype instead of the public xml doc type in my intranet env in which I cannot connect the internet.But the spring xml parse code will broken if I do this.

    Can anyone help me?

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default How to use the system id in the xml definition file -Crimson


  3. #3
    Join Date
    Sep 2004
    Posts
    6

    Default Thanks.

    Thanks.

  4. #4
    Join Date
    Sep 2004
    Posts
    6

    Default It works.

    The only thing need to do is add the xerces jar lib to the classpath.But I wonder how the springframework know which parser to use?

  5. #5
    Join Date
    Sep 2004
    Posts
    6

    Default The xml doc builder factory load order.

    See the javadoc :

    Method DetailnewInstance public static DocumentBuilderFactory newInstance() throws FactoryConfiguration;

    -------------------------------------
    (1)Use the javax.xml.parsers.DocumentBuilderFactory system property. (2)Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
    (3)Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.parsers.DocumentBuilderFactory in jars available to the runtime.
    (4)Platform default DocumentBuilderFactory instance.

Similar Threads

  1. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  2. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  3. Replies: 1
    Last Post: Jun 13th, 2005, 06:36 AM
  4. How to use the system id in the xml definition file?
    By Andreas Schuth in forum Container
    Replies: 6
    Last Post: Dec 20th, 2004, 03:51 AM
  5. Converting bean types in a beans definition file
    By davidcnoel in forum Container
    Replies: 5
    Last Post: Oct 11th, 2004, 10:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •