Skip to main content

Instance

Instance

The instance is the XML to be updated by the form.  In EonicWeb it often reflects the actual table in the database, along with individual fields that contain XML.

(cContentXmlBrief) and (cContentXmlDetail) contain the XML you require be stored for that piece of content.

If you want a control on the form to update more than one value you will need to add more than one bind.  For example, the brief and the detail for your module may both contain the title.

It is best working practice to nest the instance in an appropriate order as shown below, as this will be enable you to select the nodset easier for the binds , as you can see on the example below (tblContent0 is nested in the whole (instance), with other tags like (nContentKey), (dPublishDate), (cDescription) within that, you can nest aging as show by (cContentXmlDetail) and (cContentXmlBrief) with tags like ( Headline)

Please note tags that end with /> are self-closing.

Xform Instance Example

 

		<instance>
			<tblContent>
				<nContentKey/>
				<nContentPrimaryId/>
				<nVersion/>
				<cContentForiegnRef/>
				<cContentName/>
				<cContentSchemaName>NewsArticle</cContentSchemaName>
				<cContentXmlBrief>
					<Content>
						<Headline/>
						<PublishDate/>
						<Strapline/>
						<Images>
							<img class="thumbnail"/>
						</Images>					
					</Content>
				</cContentXmlBrief>
				<cContentXmlDetail>
					<Content>
						<Headline/>
						<PublishDate/>
						<Strapline/>
						<Body/>
						<Images>
							<img class="thumbnail"/>
							<img class="display"/>
						</Images>
					</Content>
				</cContentXmlDetail>
				<nAuditId/>
				<nAuditKey/>
				<dPublishDate/>
				<dExpireDate/>
				<dInsertDate/>
				<nInsertDirId/>
				<dUpdateDate/>
				<nUpdateDirId/>
				<nStatus>1</nStatus>
				<cDescription/>
			</tblContent>
		</instance>