This example creates a Tag-List with Data
The output of this example is the following XML file:
WCCOAui1:["Xml-Document = ... WCCOAui1:<Spaghetti-Bolognese> WCCOAui1: <Minced-Meat>Half-Half Pork and Beef</Minced-Meat> WCCOAui1: <Tomato-Concentrate>Mix it first into the meat before heating</Tomato-Concentrate> WCCOAui1: <Peeled-Tomatoes>Chop it up in smaller pieces and only add it at the end</Peeled-Tomatoes> WCCOAui1: <Pasta-Mix-of-Spices>Make sure it contains at least 50 percent of garlic</Pasta-Mix-of-Spices> WCCOAui1: <Dried-Oregano-Powder>This is more tasty than fresh one - Be generous with it</Dried-Oregano-Powder> WCCOAui1: <Cutup-Shallots>Close your eyes and don't cut your fingers</Cutup-Shallots> WCCOAui1: <Sliced-Champignons>Roast quickly into hot olive oil</Sliced-Champignons> WCCOAui1: <Other-Ingredients/> WCCOAui1:</Spaghetti-Bolognese> WCCOAui1:"]
One creates first the top-element container:
root = xmlAppendChild ( document , -1 , XML_ELEMENT_NODE , "Spaghetti-Bolognese" );
The code in the example then calls only ONCE the 'fwXml_appendChildContent()' function:
fwXml_appendChildContent ( document , root , sause_content , empty_a , sause_details , exceptionInfo );
The return parameter 'exceptionInfo' indicates the user of any errors...
The dynamic string 'sause_content' and 'sause_details' contain all the necessary information:
sause_content = makeDynString ( "Minced-Meat", "Tomato-Concentrate", "Peeled-Tomatoes", "Pasta-Mix-of-Spices", "Dried-Oregano-Powder", "Cutup-Shallots", "Sliced-Champignons", "Other-Ingredients" ); sause_details = makeDynString ( "Half-Half Pork and Beef", "Mix it first into the meat before heating", "Chop it up in smaller pieces and only add it at the end", "Make sure it contains at least 50 percent of garlic", "This is more tasty than fresh one - Be generous with it", "Close your eyes and don't cut your fingers", "Roast quickly into hot olive oil", "" );