Entities like lines, texts, mtexts, block and inserts and many others, also non-visible features like layers and styles are called Classes in CAD XML reference. They can be added by calling add instruction which accepts CAD Drawing XML Structure as a child parameter..
There are many examples of adding particular classes in Classes section of XML examples.
Go to ABViewer