Using XIncludingReader with XPionter + Namespaces

Dec 10, 2008 at 6:01 PM
Edited Dec 10, 2008 at 10:25 PM
Hi,
I'm readng a .xml file with:
var xir = new XIncludingReader("x.xml");
var doc = XDocument.Load(xir);

The x.xml file looks like this:

<?xml version="1.0"?>
<a:top-level
  xmlns:scc="http://www.blablabla.coml/x"
  xmlns:xi="http://www.w3.org/2003/XInclude">
  <a:element>
    <xi:include href="y.xml" xpointer="xpointer(/a:top-level /a:element)"/>
  </a:element>
</a:top-level >

The reader fails to find the xpath expression...
What do I need to do to make the XIncludingReader to work properly?
Coordinator
Dec 10, 2008 at 8:22 PM
could you post the contents of teh y.xml file?

On Wed, Dec 10, 2008 at 4:01 PM, damageboy <notifications@codeplex.com> wrote:

From: damageboy

Hi,
I'm readng a .xml file with:
var xir = new XIncludingReader("x.xml");
var ccXml = XDocument.Load(xir);

The x.xml file looks like this:

<?xml version="1.0"?>

xmlns:scc="http://www.blablabla.coml/x"
xmlns:xi="http://www.w3.org/2003/XInclude">

<xi:include href="y.xml" xpointer="xpointer(/a:top-level /a:element)"/>



The reader fails to find the xpath expression...
What do I need to do to make the XIncludingReader to work properly?

Read the full discussion online.

To add a post to this discussion, reply to this email (MVPXML@discussions.codeplex.com)

To start a new discussion for this project, email MVPXML@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 425.329.3471
Dec 10, 2008 at 10:27 PM
y.xml looks like this:


<?xml version="1.0"?>
<a:top-level
  xmlns:scc="http://www.blablabla.coml/x"
  xmlns:xi="http://www.w3.org/2003/XInclude">
  <a:element>
   <a:config-type-1>some content</a:config-type-1>   
  </a:element>
</a:top-level >