FatturaElettronica.XMLNodes 1.5.2

Additional Details

La versione 1.5.2 è stata deprecata per gli aggiornamenti previsti dall'Agenzia delle Entrate.

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package FatturaElettronica.XMLNodes --version 1.5.2
NuGet\Install-Package FatturaElettronica.XMLNodes -Version 1.5.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FatturaElettronica.XMLNodes" Version="1.5.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FatturaElettronica.XMLNodes --version 1.5.2
#r "nuget: FatturaElettronica.XMLNodes, 1.5.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FatturaElettronica.XMLNodes as a Cake Addin
#addin nuget:?package=FatturaElettronica.XMLNodes&version=1.5.2

// Install FatturaElettronica.XMLNodes as a Cake Tool
#tool nuget:?package=FatturaElettronica.XMLNodes&version=1.5.2

FatturaElettronica.XMLNodes

STATO BUILD: Build Status [VISUALIZZA DETTAGLI]

FatturaElettronica.XMLNodes

Il progetto FatturaElettronica.XMLNodes nasce dall’esigenza di creare una libreria (scritta in C# .NET Standard 2.0) che permetta di rappresentare tutti i nodi previsti nel formato XML (eXtensible Markup Language) della Fattura Elettronica basato sulle specifiche tecniche dell’Agenzia delle Entrate.

Nota

Ciascuna versione del package corrisponde alla versione delle specifiche tecniche rilasciate dall'Agenzia delle Entrate secondo la seguente nomenclatura: {AG-MajorVersion}.{AG-MinorVersion}.{PubVersion}

  • {AG-MajorVersion} Versione Major come stabilito dall'Agenzia delle Entrate;
  • {AG-MinorVersion} Versione Minor come stabilito dall'Agenzia delle Entrate;
  • {PubVersion} Progressivo della sequenza di pubblicazione relativo a ciascuna Versione Major dell'Agenzia delle Entrate;

Guida per l'utilizzo

In esclusiva sullo store Amazon ed in formato digitale, è disponibile la guida all'utilizzo della libreria open source per la generazione della Fattura Elettronica.

La guida si rivolge, principalmente, agli sviluppatori principianti che desiderano utilizzare la libreria nei loro programmi. Sono contenuti i commenti al codice di esempio non altrimenti recuperabili dai sorgenti presenti nel repository di GitHub.

Vi sono anche informazioni utili e collegamenti al sito dell'Agenzia delle Entrate che possono essere sfruttate da utenti avanzati che vogliano approfondire alcune tematiche relative alla Fatturazione Elettronica.

È importante che il lettore abbia familiarità con lo sviluppo del software e con i concetti base della programmazione ad oggetti.

CopertinaGuida

[ACQUISTA ONLINE]

Utilizzo della libreria

Creazione dell'istanza della classe

    FatturaElettronicaXMLNodes _nodoPrincipale = new FatturaElettronicaXMLNodes();

Aggiunta di un metodo con occorrenza singola

    IdTrasmittente _idTrasmittente = new IdTrasmittente();

Assegnazione del valore ad una proprietà del metodo

    _idTrasmittente.IdPaese = "IT";

Assegnazione del metodo figlio al metodo padre

    datiTrasmissione.IdTrasmittente = _idTrasmittente;

Aggiunta di un metodo con occorrenza multipla

    DatiCassaPrevidenziale datiCassaPrevidenziale = new DatiCassaPrevidenziale();
    List<DatiCassaPrevidenziale> datiCassaPrevidenzialeList = new List<DatiCassaPrevidenziale>();

Assegnazione delle proprietà al nodo con occorrenza multipla

    datiCassaPrevidenziale.TipoCassa = "";
    datiCassaPrevidenziale.AlCassa = "";
    [...]
    datiCassaPrevidenzialeList.Add(datiCassaPrevidenziale);
    datiGeneraliDocumento.DatiCassaPrevidenziale = datiCassaPrevidenzialeList;

Serializzazione finale dei nodi

    XmlRootAttribute XmlRoot = new XmlRootAttribute();
    XmlRoot.Namespace = "http://www.fatturapa.gov.it/sdi/fatturapa/v1.2";
    XmlAttributes myxmlAttribute = new XmlAttributes();
    myxmlAttribute.XmlRoot = XmlRoot;
    XmlAttributeOverrides xmlAttributeOverrides = new XmlAttributeOverrides();
    xmlAttributeOverrides.Add(typeof(FatturaElettronicaXMLNodes), myxmlAttribute);
    // esegue la pulizia degli appributi FatturaElettronicaHeader e FatturaElettronicaBody
    XmlAttributes emptyNsAttribute = new XmlAttributes();
    XmlElementAttribute xElement1 = new XmlElementAttribute();
    xElement1.Namespace = "";
    emptyNsAttribute.XmlElements.Add(xElement1);
    xmlAttributeOverrides.Add(typeof(FatturaElettronicaXMLNodes), "FatturaElettronicaHeader", emptyNsAttribute);
    xmlAttributeOverrides.Add(typeof(FatturaElettronicaXMLNodes), "FatturaElettronicaBody", emptyNsAttribute);
    // specifica la versione di trasmissione se verso PA o Privato
    nodoPrincipale.versione = "FPA12";
    // serializza i nodi ed esegue l'override del nodo principale per aggiungere il tag "pX"
    XmlSerializer ser = new XmlSerializer(nodoPrincipale.GetType(), xmlAttributeOverrides);
    ser = new XmlSerializer(nodoPrincipale.GetType(), new XmlRootAttribute("pX"));
    // aggiunge gli attributi
    XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
    ns.Add("ds", "http://www.w3.org/2000/09/xmldsig#");
    ns.Add("p", "http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2");
    ns.Add("xsi", "http://www.w3.org/2001/XMLSchema-instance");
    var path = percorso + nome_file;
    System.IO.FileStream file = System.IO.File.Create(path);
    ser.Serialize(new System.IO.StreamWriter(file, new System.Text.UTF8Encoding()), nodoPrincipale, ns);
    file.Close();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.7.1.1 425 9/13/2022
1.7.1 400 9/12/2022
1.6.1 624 4/27/2021