Html or xml code for the doctype, where it is located?

@bghayad I read your question two different ways, let me restate so we can focus on what you’re looking for:

  1. ERPNext doctype information is stored as a JSON file. Frappe renders this JSON file with its rendering engine. If you wanted to look at it for the Item doctype for example, here’s the link:
    erpnext/item.json at develop · frappe/erpnext · GitHub

  2. If you want to render HTML in a field within a doctype, that’s different (and hard). Here’s the best way I’m aware of, though I’d qualify that by saying that I haven’t gotten it working yet myself. There are a lot of moving parts.
    Bring Data into HTML field in the DocType