I’m trying to store the Civil Spanish Code.
It is divided in this way:
Books
----Chapters
--------Articles
OR
Books
----Titles
--------Chapters
-------------Articles
OR
Books
----Titles
--------Chapters
-------------Sections
-----------------Articles
Books, titles, chapters and sections have to store an int identifier and a String with the name of the book, title, etc. The number of elements are variable since some books have more chapters than others, for example.
Articles have to store and int identifier and a String with the content of the article.
I would apreciate an example of declaration and usage (in data, out data) of the structure since (for me) it’s a bit complex.
Rather create a Tree structure of Nodes, as follows (this is a psedo-code that can help you):
Your
SaveVisitorcan be any visitor that acceptsID,Name, and the subclasses can be of any format (XML, JSON, Structured plaintext, Excel, etc.).