Hi,

I'm a very new user of the XML package and am convinced that XML files
surely make applications light and flexible to use. Thanks for this package.

 

I'm looking to write an XML file from a 1-way, 2-way and 3 -way frequency
table in a specific format.

 

My 1-way table looks like this

 

month  value

Jan         100

Feb        200

Mar        300

Apr         200

May       100

 

I'm trying to write a XML file that must finally look like this

 

<items>
 <item month="Jan" value="100" />
 <item month="Feb" value="200" />
 <item month="Mar" value="300" />
 <item month="Apr" value="200" />
 <item month="May" value="100" />
 <item month="June" value="39" />
 <item month="July" value="42" />
 <item month="Aug" value="36" />
 <item month="Sept" value="50" />
 <item month="Oct" value="52" />
 <item month="Nov" value="60" />
 <item month="Dec" value="50" />
</items> 

 

I know its got something to do with xml$addtag but i'm just not able to get
it in this format.

Alos, i tried the convertToXML but that doesn't work this way either.

 

Can someone please help? I'll then try and replicate for my 2-way and 3-way
tables.

 

 

Thanks,
AK


	[[alternative HTML version deleted]]

