Thanks for the reply.  You are right.  <import/> is just a normal tag and
from my own schema.  I don't expect any parser understand that.  I will need
to manually load all imported files into memory and treat them as a single
XML in memory for navigation.  I will have to write special logic to
interpret <import/>.

For example, File A imports File B and File B import File C.  I want to load
File A, B and C together into memory as a single XML.  So, can I do this:
XmlObject.Factory.parse(FileA);
XmlObject.Factory.parse(FileB);
XmlObject.Factory.parse(FileC);
Will this load 3 XML files into memory as a single XML?

If not, as a workaround, I can do pre-process: concatenate File A, B and C
into a single File X based on <import/> tag.  Then use
"XmlObject.Factory.parse(FileX)" to load it into memory for havigation.  Or
is there a better way?

I am curious how Ant does this for its multiple build files using
<import/>.  I am sure Ant does not use XMLBean.

Thanks,
Bo


On 6/12/07, Jacob Danner <[EMAIL PROTECTED]> wrote:

Hi Bo,
I'm not sure I completely understand the question, but I'll give it a
shot.
If you are trying to do something like
XmlObject.Factory.parse(<instanceDocument/>);
My guess is your <import /> tag won't work as you expect it to because
its not part of the normal XML grammar (AFAIK) and the parser won't
know what to do with it.
Do you know of another parser that works with this? In other words,
how are you making your <import /> element work currently?

Thanks,
-Jacob Danner

On 6/12/07, Bo Wen <[EMAIL PROTECTED]> wrote:
> Hi, All,
>
> I have multiple XML files related through my own <import> tag.  These
files
> share same schema.  This is used to support content sharing and
inheritance
> like features.  Put another way, it is like <import> tag in Ant build
file.
>
> Can XMLBean load and parse multiple XMLs at one time?  If not, I will
try to
> concatenate multiple XMLs into a single file based on <import> tag, then
use
> XMLBean to parse.  Or is there a better solution?
>
> Thanks in advance!
> Bo
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to