|
Namespaces |
Top Previous Next |
|
Content entries can contain one entry or support multiple entries or namespaces. When an entry is tagged to support namespaces, multiple items can be entered. This applies to Company and Product Content Entries.
Below is a call to als_get_company_info.cgi with content enabled and a TopTen entry tagged as name space enabled. Notice the <namespaces> entry that contains the <top_ten> entry. Whenever any item is namespace enabled a separate namespace is crated named <namespaces> and then the item data is contained using the name of the entry.
<?xml version="1.0" encoding="utf-8" ?> - <root> - <company> <row name="Activity Link Systems" address1="1819 Kihei Road" address2="" city="Kihei" state="HI" zip="96753" fax="808-875-9049" phone="808-891-2230" email="kumar@activitylinksystems.com" downloadpages="www.activitylinksystems.com/downloads" support_email="support@activitylinksystems.com" directionsa="test contentabc" yetanothername="duke gator's party" webexample="dynamic content" newproductentry="data" /> </company> - <namespaces> - <SiteName> <row name="site_name" data="kumar's activity site" /> </SiteName> - <MainPageParagraphs> <row name="main" data="something for the main page" /> <row name="MainPageParagraphs" data="add another one" /> </MainPageParagraphs> - <top_ten> <row name="top_ten" data="Top ten #1" /> <row name="top_ten" data="Top ten #2" /> <row name="top_ten" data="Top ten #3" /> <row name="top_ten" data="Top ten #4" /> </top_ten> </namespaces> </root>
Now we change the TopTen Entry to not use NameSpaces.
Note how the XML has changed to include the top_ten entry as part of the main data.
top_ten="default"
<?xml version="1.0" encoding="utf-8" ?> - <root> - <company> <row name="Activity Link Systems" address1="1819 Kihei Road" address2="" city="Kihei" state="HI" zip="96753" fax="808-875-9049" phone="808-891-2230" email="kumar@activitylinksystems.com" downloadpages="www.activitylinksystems.com/downloads" support_email="support@activitylinksystems.com" directionsa="test contentabc" yetanothername="duke gator's party" webexample="dynamic content" newproductentry="data" top_ten="default" /> </company> - <namespaces> - <SiteName> <row name="site_name" data="kumar's activity site" /> </SiteName> - <MainPageParagraphs> <row name="main" data="something for the main page" /> <row name="MainPageParagraphs" data="add another one" /> </MainPageParagraphs> </namespaces> </root> CMS Namespace advanced API Information
|