Loading and Persisting Data from an XPathDocument

Loaded XPathDocument with c:\inetpub\wwwroot\articles\readwritexml\data\slides.xml

Created XPathNavigator and moved to the first slide element

XPathNavigator.CanEdit property = False

XPathNavigator.OuterXml property = <slide position="1" xmlns="http://myns/slidesdemo"> <title>Agenda</title> <rv:reviewed xmlns:rv="http://myns/slidesdemo/reviewdate">2004-05-10T00:00:00</rv:reviewed> </slide>

XPathNavigator.InnerXml property = <title xmlns="http://myns/slidesdemo">Agenda</title> <rv:reviewed xmlns:rv="http://myns/slidesdemo/reviewdate">2004-05-10T00:00:00</rv:reviewed>

Values from the ReadSubtree method:
Element Name: slide
- Attribute Name: position   Value: '1'
Element Name: title
Element Value: 'Agenda'
Element Name: rv:reviewed
Element Value: '2004-05-10T00:00:00'

Contents of file created with the WriteSubtree method:

<?xml version="1.0" encoding="utf-8"?>
<slide position="1" xmlns="http://myns/slidesdemo">
  <title>Agenda</title>
  <rv:reviewed xmlns:rv="http://myns/slidesdemo/reviewdate">2004-05-10T00:00:00</rv:reviewed>
</slide>


[view source]     ©2005 Dave And Al, Stonebroom Limited, England.