Con l'avvento della Fattura Elettronica (  ) è nato il bisogno di leggere i file p7m (che arrivano nella posta certificata se non hai un portale con codice univoco)
 ) è nato il bisogno di leggere i file p7m (che arrivano nella posta certificata se non hai un portale con codice univoco)
Il formato del p7m della fattura elettronica (fortunatamente) non è codificata/crittografata.
Con questa libreria ho voluto creare uno strumento che estrae il file XML e/o eventuali allegati PDF della fattura elettronica.
SD_p7m
Author: Star-Dust
Version: 0.05
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
PS. Ovviamente non è adatto a file p7m che non siano fatture elettroniche per potrebbero essere criptati. E sempre ovviamente non verifica la certificazione del documento.
			
			Il formato del p7m della fattura elettronica (fortunatamente) non è codificata/crittografata.
Con questa libreria ho voluto creare uno strumento che estrae il file XML e/o eventuali allegati PDF della fattura elettronica.
SD_p7m
Author: Star-Dust
Version: 0.05
- ParseXml- Functions:- Class_Globals  As String
 
- ErrorXML  As Map
 
- Initialize (XML As String) As String
 Initializes the object. You can add parameters to this method if needed.
- IsInitialized  As Boolean
 Verifica se l'oggetto sia stato inizializzato.
- ProperXML As String
 
- Class_Globals  As String
 
- Functions:
- XMLTreeView- Functions:- BringToFront  As String
 
- Class_Globals  As String
 
- DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
 Base type must be Object
- Initialize (Callback As Object, EventName As String) As String
 
- Invalidate  As String
 
- IsInitialized  As Boolean
 Verifica se l'oggetto sia stato inizializzato.
- RenderXML (XMLtext As String) As String
 
- RequestFocus  As String
 
- SendToBack  As String
 
- Snapshot As B4XView
 
- BringToFront  As String
- Properties:- Enable As Boolean
 
- Height As Int
 
- Left As Int
 
- Tag As Object
 
- Top As Int
 
- Visible As Boolean
 
- Width As Int
 
- Enable As Boolean
 
- Functions:
- p7m- Fields:- CharSet As String
 
- Functions:- AllegatoFileName  As String
 
- AllegatoRaw  As Byte()
 
- AllegatoToString  As String
 
- Class_Globals  As String
 
- Initialize (Path As String, FileName As String) As String
 Initializes the object. You can add parameters to this method if needed.
- IsInitialized  As Boolean
 Verifica se l'oggetto sia stato inizializzato.
- xlmByte  As Byte()
 
- xlmString As String
 
- AllegatoFileName  As String
 
- Fields:
			
				B4X:
			
		
		
		Sub Decode(Path As String, NomeXML As String)
    Dim p7m_fe As sd_p7m
    p7m_fe.Initialize(Path,NomeXML)
 
 
    File.WriteString(File.DirApp,NomeXML.Replace(".p7m",""),p7m_fe.xlmString)
    If p7m_fe.xlmString.IndexOf("<Attachment>")>-1 Then
        ' Se c'è allegato lo salvo
        File.WriteString(File.DirApp,p7m_fe.AllegatoFileName,p7m_fe.AllegatoToString)
    End If
End SubPS. Ovviamente non è adatto a file p7m che non siano fatture elettroniche per potrebbero essere criptati. E sempre ovviamente non verifica la certificazione del documento.
Attachments
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
	
								
							
							 
				 
 
		 
 
		 
 
		 
 
		