Jatin
Jatin

Reputation: 318

xml document having external references

Is there a way wherein an xml document can refer to a variable/element which is defined in some other xml file on the same machine?

Upvotes: 0

Views: 296

Answers (1)

forty-two
forty-two

Reputation: 12817

Sure, like this:

outer.xml:

<!DOCTYPE outer [
    <!ELEMENT outer ANY>
    <!ENTITY inner SYSTEM "inner.xml" >
]>
<outer>
    &inner;
    &inner;
</outer>

inner.xml

<inner/>

Upvotes: 1

Related Questions