FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
[WD] XML Creation
[WD] XML Creation
Débuté par Gianni Spano, 23 juil. 2017 15:44 - 4 réponses
Connectez-vous…
Gianni Spano
#1
Posté le 23 juillet 2017 - 15:44
Hello to all
I'm creating an XML file and i have a few questions to post here.
1) How to change the first line created by my program? Some parameter to use? :
<?xml version="1.0" encoding="ISO-8859-1" TO <?xml version="1.0" encoding="UTF-8"?>
2) Is there a Xml function to create this line (copied from another Xml file)?
<?xml-stylesheet type="text/xsl" href="(File per visualizzazione FatturaPA 1.2 - NON inviare).xsl"?>
Suggestions are very appreciated
TIA
Gianni
Signaler
0
0
Fabrice Harari
#2
Posté le 23 juillet 2017 - 17:24
Hi Gianni,
I don't know if there is another way, but once the file is created, you can simply use the replace function to replace the original first line by yours
Best regards
Signaler
0
0
Gianni Spano
#3
Posté le 23 juillet 2017 - 20:28
Hello Fabrice
Thanks for your response.
Yes, i thought the same approach..but i wanted to know if there were any other ways.
Thanks again
Gianni
Signaler
0
0
Allard
#4
Posté le 24 juillet 2017 - 18:34
Hi
you can add it:
PROCEDURE Constructor()
xmlfact..Encoding = "UTF-8"
nNamespace1 is xmlNamespace
nNamespace2 is xmlNamespace
nNamespace3 is xmlNamespace
nNamespace4 is xmlNamespace
nNode is dynamic xmlNode
nNode = xmlfact.Invoice
nNamespace4..URI = "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" //1
nNamespace3..URI = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" //2
nNamespace3..Name = "cac" //2
nNamespace2..Name = "cbc"
nNamespace2..URI = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"//3
nNamespace1..Name = "xsi"
nNamespace1..URI = "
http://www.w3.org/2001/XMLSchema-instance
"
Add(nNode..NamespaceDeclared, nNamespace4)
Add(nNode..NamespaceDeclared, nNamespace3)
Add(nNode..NamespaceDeclared, nNamespace2)
Add(nNode..NamespaceDeclared, nNamespace1)
nNode:schemaLocation..Value = "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2
http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd
"
nNode:schemaLocation..Namespace = nNamespace1
This stuff is needed for an ubl invoice
Regards
Allard
Signaler
0
0
Gianni Spano
#5
Posté le 24 juillet 2017 - 19:57
Hello Allard
Thank you for your suggestion
Gianni
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte