Basics: InnerXml and OuterXml

If you worked though the first attempt to interact with SharePoint data through web services (here) you must have noticed the batchXML.innerXml line:

batchXML.InnerXml = “<Method ID = ’1′ Cmd=’New’><Field Name=’Title’>” + strName + “</Field> + “</Method>”;

So, what is the InnerXml and how is it different of the OuterXml?

For an XmlDocument, both InnerXml and OuterXml define nodes of the document. The difference is that:

1. InnerXml points to the children of the current node
2. OuterXml points to the current node and its children.

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.