Hello,
In fact, in the help of Mathematica, I have almost find the desired function. This help is available when you look Transforming XML.
Here is the beginning of the code :
XMLNote[XMLElement[tag_, attributes_, data_], m_Integer] :=
Cell[CellGroupData[{
Cell[TextData[
StyleBox[tag, FontFamily -> "Swiss",
FontWeight -> "Bold", FontSize -> 15]]],
Sequence @@ (XMLNote[#1, m] &) /@ attributes,
Sequence @@ (XMLNote[#1, m + 30] &) /@ data
}, Open],
CellMargins -> {{m, Inherited}, {Inherited, Inherited}}]
However, I have still difficulty to understand the code and namely these two lines :
Sequence @@ (XMLNote[#1, m] &) /@ attributes,
Sequence @@ (XMLNote[#1, m + 30] &) /@ data
Questions
- May you explain why the XMLNote is a recursive function ?
- Is the level of hierarchy asked 30 ?
- Why #1 is used more than # alone ?
Thank for your help