<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>XMLtoTable</title>
        <description> Windev should consider to provide an XLMToTable function so that I don&amp;#039;t need to write this as a workaround. 

See below: 

// 14:16:38 Fri 9 Oct 2009 xml2memoryTable 
// 14:44:51 Sat 10 Oct 2009 

XMLDoc is string=&amp;quot;XML&amp;quot; 
XMLInfo is string 
sXmlTable is string = &amp;quot;C:\1.xml&amp;quot; 
sTableName is string 
sDir is string=completeDir(&amp;quot;c:\wd7\7&amp;quot;) //Make your own DIR 
sFile is string=&amp;quot;dTable&amp;quot; 

HCancelDeclaration(dTable) 
TableDesc is file description 
ItemDesc is item description 
dTable is data source 
fDelete(sFile+&amp;quot;.fic&amp;quot;) 
fDelete(sFile+&amp;quot;.ndx&amp;quot;) 
hDuplicateKey is int = 2062 //2061 for hUniqueKey 
nSize is int = 40 

// Description of the &amp;quot;dTable&amp;quot; file 
TableDesc..Name = &amp;quot;dTable&amp;quot; 
TableDesc..Type = hFileNormal 
TableDesc..FicCryptMethod = hCryptStandard 


XMLClose(XMLDoc) //Frees the XML document 

// Load the XML file in a string 
XMLInfo = fLoadText(sXmlTable) 
// Initialize the XML functions on this file 
XMLDocument(XMLDoc,XMLInfo) 
// point to the root 
XMLRoot(XMLDoc) 
XMLFind(XMLDoc, null) 
sTableName = XMLElementName(XMLDoc) 
//trace(&amp;quot;ParentName&amp;quot;+nElement+&amp;quot;=&amp;quot;+ XMLElementName(XMLDoc) ) 

XMLChild(XMLDoc) 
XMLFirst(XMLDoc) 

//trace(&amp;quot;elementName&amp;quot;+nElement+&amp;quot;=&amp;quot;+ XMLElementName(XMLDoc) ) 
ItemDesc..Name = XMLElementName(XMLDoc) 
ItemDesc..Type = hItemText 
ItemDesc..Size = nSize 
ItemDesc..KeyType = hDuplicateKey 

HDescribeItem ( TableDesc , ItemDesc ) 

nElement is int = 1 
XMLNext(XMLDoc) 
WHILE NOT XMLOut(XMLDoc) 
nElement = nElement + 1 
ItemDesc..Name = XMLElementName(XMLDoc) 
ItemDesc..Type = hItemText 
ItemDesc..Size = nSize 
HDescribeItem ( TableDesc , ItemDesc ) 
// trace(&amp;quot;elementName&amp;quot;+nElement+&amp;quot;=&amp;quot;+ XMLElementName(XMLDoc) ) 
XMLNext(XMLDoc) 
END 

HDeclareExternal(sDir+sFile+&amp;quot;.fic&amp;quot;, sFile) 
HDescribeFile ( TableDesc ) 
HImportXML ( dTable , sXmlTable , hImpCreation ) 
//Make a DUMMY Memory table, a few columns will do, mine is a 3-column table 
OpenChild(&amp;quot;t=c:\wd7\wdw\t03.wdw&amp;quot;) 

BuildBrowsingTable(&amp;quot;t.tbl&amp;quot;, sFile,taFillTable) //t.tbl WDWname.TableName 
HCancelDeclaration(sFile) 
HClose(dTable) 

//trace(&amp;quot;Total # of Elements in &amp;quot;+ sTableName + &amp;quot; = &amp;quot; + nElement) 
// Cancels the search for the other XML functions used thereafter 

XMLCancelSearch(XMLDoc) 
XMLClose(XMLDoc) //Frees the XML document 
</description>
        <link>https://www.wxforum.info/read.php?27161,38744,38744#msg-38744</link>
        <lastBuildDate>Tue, 19 May 2026 02:58:53 +0200</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,38744,60576#msg-60576</guid>
            <title>Re: XMLtoTable</title>
            <link>https://www.wxforum.info/read.php?27161,38744,60576#msg-60576</link>
            <description><![CDATA[ There is a simple way to import an xml to a table availeble.<br />
<br />
<br />
sFile is string<br />
<br />
// Opens the file picker<br />
sFile = fSelect(SysDir, &quot;&quot;, &quot;Select a file...&quot;, &quot;xml import&quot; + TAB + &quot;*.xml&quot;, &quot;*.xml&quot;)<br />
<br />
<br />
HImportXML(Producten,sFile,&quot;&quot;,&quot;&quot;,hImpCreation,&quot;&quot;)<br />
<br />
<br />
<br />
TableDisplay(TABLE_Producten)]]></description>
            <dc:creator>Renko</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Tue, 18 May 2010 17:02:25 +0200</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27161,38744,38744#msg-38744</guid>
            <title>XMLtoTable</title>
            <link>https://www.wxforum.info/read.php?27161,38744,38744#msg-38744</link>
            <description><![CDATA[ Windev should consider to provide an XLMToTable function so that I don&#039;t need to write this as a workaround. <br />
<br />
See below: <br />
<br />
// 14:16:38 Fri 9 Oct 2009 xml2memoryTable <br />
// 14:44:51 Sat 10 Oct 2009 <br />
<br />
XMLDoc is string=&quot;XML&quot; <br />
XMLInfo is string <br />
sXmlTable is string = &quot;C:\1.xml&quot; <br />
sTableName is string <br />
sDir is string=completeDir(&quot;c:\wd7\7&quot;) //Make your own DIR <br />
sFile is string=&quot;dTable&quot; <br />
<br />
HCancelDeclaration(dTable) <br />
TableDesc is file description <br />
ItemDesc is item description <br />
dTable is data source <br />
fDelete(sFile+&quot;.fic&quot;) <br />
fDelete(sFile+&quot;.ndx&quot;) <br />
hDuplicateKey is int = 2062 //2061 for hUniqueKey <br />
nSize is int = 40 <br />
<br />
// Description of the &quot;dTable&quot; file <br />
TableDesc..Name = &quot;dTable&quot; <br />
TableDesc..Type = hFileNormal <br />
TableDesc..FicCryptMethod = hCryptStandard <br />
<br />
<br />
XMLClose(XMLDoc) //Frees the XML document <br />
<br />
// Load the XML file in a string <br />
XMLInfo = fLoadText(sXmlTable) <br />
// Initialize the XML functions on this file <br />
XMLDocument(XMLDoc,XMLInfo) <br />
// point to the root <br />
XMLRoot(XMLDoc) <br />
XMLFind(XMLDoc, null) <br />
sTableName = XMLElementName(XMLDoc) <br />
//trace(&quot;ParentName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
<br />
XMLChild(XMLDoc) <br />
XMLFirst(XMLDoc) <br />
<br />
//trace(&quot;elementName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
ItemDesc..Name = XMLElementName(XMLDoc) <br />
ItemDesc..Type = hItemText <br />
ItemDesc..Size = nSize <br />
ItemDesc..KeyType = hDuplicateKey <br />
<br />
HDescribeItem ( TableDesc , ItemDesc ) <br />
<br />
nElement is int = 1 <br />
XMLNext(XMLDoc) <br />
WHILE NOT XMLOut(XMLDoc) <br />
nElement = nElement + 1 <br />
ItemDesc..Name = XMLElementName(XMLDoc) <br />
ItemDesc..Type = hItemText <br />
ItemDesc..Size = nSize <br />
HDescribeItem ( TableDesc , ItemDesc ) <br />
// trace(&quot;elementName&quot;+nElement+&quot;=&quot;+ XMLElementName(XMLDoc) ) <br />
XMLNext(XMLDoc) <br />
END <br />
<br />
HDeclareExternal(sDir+sFile+&quot;.fic&quot;, sFile) <br />
HDescribeFile ( TableDesc ) <br />
HImportXML ( dTable , sXmlTable , hImpCreation ) <br />
//Make a DUMMY Memory table, a few columns will do, mine is a 3-column table <br />
OpenChild(&quot;t=c:\wd7\wdw\t03.wdw&quot;) <br />
<br />
BuildBrowsingTable(&quot;t.tbl&quot;, sFile,taFillTable) //t.tbl WDWname.TableName <br />
HCancelDeclaration(sFile) <br />
HClose(dTable) <br />
<br />
//trace(&quot;Total # of Elements in &quot;+ sTableName + &quot; = &quot; + nElement) <br />
// Cancels the search for the other XML functions used thereafter <br />
<br />
XMLCancelSearch(XMLDoc) <br />
XMLClose(XMLDoc) //Frees the XML document <br />
]]></description>
            <dc:creator>King</dc:creator>
            <category>WinDev Solutions</category>
            <pubDate>Sun, 18 Oct 2009 09:20:41 +0200</pubDate>
        </item>
    </channel>
</rss>
