[This documentation is preliminary and is subject to change.]
The hosting Windows Live application communicates with a publishing plug-in by passing two XmlDocument objects, one that provides details about a particular publishing session, and one that describes any persistent configuration settings that are used by the publishing plug-in.

Session XML
The session-specific XmlDocument describes the set of photo and video items to publish for a specific publishing session, and provides details about each item. The session XML document (sessionXml) is passed to each method supported by the IPublishPlugin Interface interface.
Note: |
|---|
|
There is no guarantee that a plug-in will remain loaded between calls to the plug-ins IPublishPlugin interface; it is important that plug-ins write any session-specific information to the session XmlDocument before returning from each method call.
|
The following example shows a typical session XML document structure.
<?xml version="1.0" ?>
<PhotoGalleryPublishSession versionMajor="1" versionMinor="0">
<PublishParameters>
<MaxWidth>1024</MaxWidth>
<MaxHeight>1024</MaxHeight>
</PublishParameters>
<ItemSet>
<Item id="1">
<FullFilePath>d:\samples\sample1.jpg</FullFilePath>
<OriginalFileName>sample1.jpg</OriginalFileName>
<OriginalFileExtension>.jpg</OriginalFileExtension>
<PerceivedType>image</PerceivedType>
<Title>sample1</Title>
<OriginalWidth>4000</OriginalWidth>
<OriginalHeight>3000</OriginalHeight>
<LengthMS>0</LengthMS>
<FileSize>1024</FileSize>
<KeywordSet>
<Keyword>Keyword 1</Keyword>
<Keyword>Keyword 2</Keyword>
</KeywordSet>
<PeopleRegionSet>
<PersonRegion left="0.2" top="0.2" width="0.5" height="0.5">John Doe</PersonRegion>
</PeopleRegionSet>
</Item>
<Item id="2">
<FullFilePath>d:\samples\sample2.jpg</FullFilePath>
<OriginalFileName>sample2.jpg</OriginalFileName>
<OriginalFileExtension>.jpg</OriginalFileExtension>
<PerceivedType>image</PerceivedType>
<Title>sample2</Title>
<OriginalWidth>4000</OriginalWidth>
<OriginalHeight>3000</OriginalHeight>
<LengthMS>0</LengthMS>
<FileSize>1024</FileSize>
<KeywordSet>
<Keyword>Keyword 1</Keyword>
<Keyword>Keyword 2</Keyword>
</KeywordSet>
<PeopleRegionSet />
</Item>
</ItemSet>
</PhotoGalleryPublishSession>

Persistent XML
The publishing plug-in platform provides a persistent XmlDocument that can be used to store general plug-in settings between publishing sessions; the persistent XmlDocument is encrypted and stored on the user's computer. When a publishing plug-in is started, the hosting Windows Live application calls the plug-in's ShowConfigurationSettings method and passes in the persistent XmlDocument through the persistXml parameter.
There is no fixed format for the persistent XmlDocument; plug-in developers may define the structure of this document as needed.
Security Note: |
|---|
|
The persistent XML is designed to store general plug-in settings; it is not intended to store sensitive user information, such as login credentials. Do not use the persistent XML to store sensitive user information.
|

See Also