Results 1 to 2 of 2

Thread: XInclude and XmlBeanFactory

  1. #1
    Join Date
    Sep 2004
    Posts
    17

    Default XInclude and XmlBeanFactory

    Does XmlBeanFactory support any type of file inclusion, such as XInclude to allow the beans file to be broken out into multiple layers of bean xml files? Or, would it be necessary to manually use XInclude to generate a temporary file (or stream resource) and then use XmlBeanFactory to load that?

    Basically, i'd like to load a beans.xml file from my applicatoin jar, and include other .xml files via this mechanism.

    Any thoughts?

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    Spring 1.1.1 added "import" element for XML beans definitions to allow for loading further bean definitions from relative paths.
    Quote Originally Posted by spring-beans.dtd
    <!--
    Specifies an XML bean definition resource to import.
    -->
    <!ELEMENT import EMPTY>

    <!--
    The relative resource location of the XML bean definition file to import,
    for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
    -->
    <!ATTLIST import resource CDATA #IMPLIED>
    You can also use ApplicationContext which allow using multiple XML files for beans definitions. You can mix files from the filesystem and the classpath.

    HTH
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Posting Permissions

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