---
title: "API de Descubrimiento de Versiones"
description: "Referencia de VersionDiscoverer, CfdiVersion, TfdVersion, RetencionVersion y contenedores de atributos."
canonical_url: "https://nodecfdi.com/packages/cfdi-core/api-reference/version-discovery-api"
---

> Index of every page on this site: [llms.txt](https://nodecfdi.com/llms.txt)

Referencia de las clases del módulo de descubrimiento de versiones en `@nodecfdi/cfdi-core`.

## `VersionDiscoverer` (abstracta)

- `abstract rules(): Record<string, string>`
- `discover(container: ContainerWithAttributeInterface): string`
- `getFromDOMElement(element: Element): string`
- `getFromDOMDocument(document: Document): string`
- `getFromNode(node: XmlNodeInterface): string`
- `getFromXmlString(contents: string): string`

## Implementaciones incluidas

<table>
<thead>
  <tr>
    <th>
      Clase
    </th>
    
    <th>
      Reglas (<code>
        rules()
      </code>
      
      )
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        CfdiVersion
      </code>
    </td>
    
    <td>
      <code>
        { '4.0': 'Version', '3.3': 'Version', '3.2': 'version' }
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        TfdVersion
      </code>
    </td>
    
    <td>
      <code>
        { '1.1': 'Version', '1.0': 'version' }
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        RetencionVersion
      </code>
    </td>
    
    <td>
      <code>
        { '2.0': 'Version', '1.0': 'Version' }
      </code>
    </td>
  </tr>
</tbody>
</table>

## Contenedores

Implementan `ContainerWithAttributeInterface`:

- `DomElementContainer`: `constructor(element: Element)`, `getAttributeValue(attribute: string): string`
- `NodeContainer`: `constructor(node: XmlNodeInterface)`, `getAttributeValue(attribute: string): string`

## Sitemap

See the full [sitemap](https://nodecfdi.com/sitemap.md) for all pages.
