Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xi:include

Status
Not open for further replies.

xdzgor

Programmer
May 17, 2010
4
DK
Hi, I am using xi:include to include external xml in my main xml document.

For example:

<xi:include href=" />

This is fine if "config.aspx" returns valid xml. But if "config.aspx" returns invalid xml, then the whole document fails (the xml returned from config.aspx can't be parsed). Sometimes the "config.aspx" returns an empty string, and this is invalid xml.

How can I configure the xi:include so it ignores parsing errors, and doesn't include the invalid xml in the main document?

I looked at <xi:fallback> but it appears this is only invoked if the external resource can't be found, not if the external resource exists but is invalid.

I also looked at parse="text", but this will encode the xml returned from config.aspx, and I'm not entirely sure this is what I want - I want xml after all, not text.

Any help appreciated!

Thanks,
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top