<universe>
<id>5200</id>
<cuid>AZtmGeZqCllIugfputlCuho</cuid>
<name>eFashion</name>
<description>eFashion retail Data Warehouse dated 14 Oct 2007. 89,000+ row fact table.
Version 13</description>
<type>unv</type>
<folderId>5199</folderId>
<maxRowsRetrieved>90000</maxRowsRetrieved>
<maxRetrievalTime>300</maxRetrievalTime>
<outline aggregated="false">
<folder>
<name>Time period</name>
<description>Time hierarchy</description>
<item hasLov="true" dataType="String" type="Dimension">
<id>DObc</id>
<name>Year</name>
<description>Year 2003 - 2006.</description>
<item hasLov="true" dataType="String" type="Attribute">
<id>DObb</id>
<name>Fiscal Period</name>
<description>Year FY99 - FY01</description>
<path>Time period|folder\Year|dimension\Fiscal Period|attribute</path>
</item>
<path>Time period|folder\Year|dimension</path>
</item>
<item hasLov="true" dataType="String" type="Dimension">
<id>DOba</id>
<name>Quarter</name>
<description>Quarter number: Q1, Q2, Q3, Q4.</description>
<path>Time period|folder\Quarter|dimension</path>
</item>
<item hasLov="true" dataType="Numeric" type="Dimension">
<id>DOb9</id>
<name>Month</name>
<description>Month number in year, 1-12.</description>
<item hasLov="true" dataType="String" type="Attribute">
<id>DOc4</id>
<name>Month Name</name>
<description>Month name, January-December.</description>
<path>Time period|folder\Month|dimension\Month Name|attribute</path>
</item>
<path>Time period|folder\Month|dimension</path>
</item>
... </folder>
<folder>
<name>Measures</name>
<description>3 years historical view showing measures in both USD and Euros.</description>
<item hasLov="true" dataType="Numeric" type="Measure">
<id>DO93</id>
<name>Sales revenue</name>
<description>Sales revenue $ - $ revenue of SKU sold</description>
<path>Measures|folder\Sales revenue|measure</path>
<aggregationFunction>Sum</aggregationFunction>
</item>
<item hasLov="true" dataType="Numeric" type="Measure">
<id>DO94</id>
<name>Quantity sold</name>
<description>Quantity sold - number of SKU sold</description>
<path>Measures|folder\Quantity sold|measure</path>
<aggregationFunction>Sum</aggregationFunction>
</item>
<item hasLov="true" dataType="Numeric" type="Measure">
<id>DO92</id>
<name>Margin</name>
<description>Margin $ = Revenue - Cost of sales</description>
<path>Measures|folder\Margin|measure</path>
<aggregationFunction>Sum</aggregationFunction>
</item>
<item hasLov="true" dataType="Numeric" type="Measure">
<id>DObf</id>
<name>Discount</name>
<description>Total discount of a SKU. Discount= Qty * Unit Price - Revenue. Negative sums indicate the product was marked up (increased margin). Note discount is a calculated object (it does not exist in the fact table).</description>
<path>Measures|folder\Discount|measure</path>
<aggregationFunction>Sum</aggregationFunction>
</item>
</folder>
</outline>
</universe>
Private Sub refreshContenuUniversObjets()
...
numLigne = 4
Set oNodeXML = objXML.SelectSingleNode("/universe/outline")
Call parcourirNodeUniv(oNodeXML, "", f)
End Sub
' Browse the XML tree of universe recursively and paste values in worksheet
' Parameters :
' - node : element of the tree, the proc scans only the childs
' - path : path of the node ( "" at start)
' - f : excel worksheet
Private Sub parcourirNodeUniv(ByVal node As MSXML2.IXMLDOMNode, path As String, f As Worksheet)
Dim enf, att As MSXML2.IXMLDOMNode
Dim subpath, fullpath As String
For Each enf In node.ChildNodes
If enf.BaseName = "folder" Then
subpath = enf.SelectSingleNode("name").Text
If path = "" Then fullpath = subpath Else fullpath = path & "/" & subpath
Call parcourirNodeUniv(enf, fullpath, f) 'recursive : childs
ElseIf enf.BaseName = "item" Then
On Error Resume Next ' we cheat if we don't have the node or the attribute
f.Cells(numLigne, 1) = Decode_UTF8(path)
f.Cells(numLigne, 2) = Decode_UTF8(enf.SelectSingleNode("name").Text)
f.Cells(numLigne, 3) = enf.Attributes.getNamedItem("type").Text
f.Cells(numLigne, 4) = enf.Attributes.getNamedItem("dataType").Text
f.Cells(numLigne, 5) = enf.Attributes.getNamedItem("hasLov").Text
f.Cells(numLigne, 6) = enf.SelectSingleNode("aggregationFunction").Text
f.Cells(numLigne, 7) = Decode_UTF8(enf.SelectSingleNode("description").Text)
On Error GoTo 0 ' don't cheat
numLigne = numLigne + 1
' childs for some objects like dimension/attribute
subpath = enf.SelectSingleNode("name").Text
If path = "" Then fullpath = subpath Else fullpath = path & "/" & subpath
Call parcourirNodeUniv(enf, fullpath, f)
End If
Next
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |