Click here to Skip to main content
14,388,831 members
   

XML / XSL

 
QuestionXSLT passing a variable to starts-with Pin
bjmallon13-Feb-17 15:03
Memberbjmallon13-Feb-17 15:03 
AnswerRe: XSLT passing a variable to starts-with Pin
Richard Deeming14-Feb-17 3:32
mveRichard Deeming14-Feb-17 3:32 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon16-Feb-17 19:45
Memberbjmallon16-Feb-17 19:45 
GeneralRe: XSLT passing a variable to starts-with Pin
Richard Deeming17-Feb-17 2:48
mveRichard Deeming17-Feb-17 2:48 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon20-Feb-17 23:55
Memberbjmallon20-Feb-17 23:55 
GeneralRe: XSLT passing a variable to starts-with Pin
Richard Deeming21-Feb-17 2:42
mveRichard Deeming21-Feb-17 2:42 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon21-Feb-17 11:24
Memberbjmallon21-Feb-17 11:24 
QuestionHow to generate XML file with serialisation in vb.net Pin
Member 1280320219-Oct-16 9:06
MemberMember 1280320219-Oct-16 9:06 
Hi there,

I have a one big prob.

I want to generate xml file with a specific format Like this syntax!:


<declarationrelevededuction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<identifiantfiscal>1088081
<annee>2016
<periode>8
<regime>1
<relevedeductions>
<rd>
<ord>1
<num>FF160400146
<des>PRESTATION
<mht>2400.00
<tva>480.00
<ttc>2880.00
<reff>
<if>52803595
<nom>LEADER SOFT
<ice>001540114000046

<tx>20.00
<mp>
<id>2

<dpai>2016-08-01
<dfac>2016-01-30

<rd>
<ord>2
<num>FF160400147
<des>PRESTATION
<mht>1500.00
<tva>300.00
<ttc>1800.00
<reff>
<if>52803595
<nom>LEADER SOFT
<ice>001540114000046

<tx>20.00
<mp>


So, I've created form with button to generate the xml files and I created this code for That:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim xmlsetting As New XmlWriterSettings
'xmlsetting.ConformanceLevel = ConformanceLevel.Document
'xmlsetting.OmitXmlDeclaration = True
Dim writxml As XmlWriter = XmlWriter.Create("mytest.xml", xmlsetting)
Try
With writxml
.WriteStartDocument()
.WriteStartElement("DeclarationReleveDeduction")
.WriteStartElement("identifiantFiscal")
.WriteString("111111")
.WriteEndElement()
.WriteStartElement("annee")
.WriteString("2016")
.WriteEndElement()
.WriteStartElement("periode")
.WriteString("8")
.WriteEndElement()
.WriteStartElement("regime")
.WriteString("1")
.WriteEndElement()
.WriteStartElement("Relvededution")
For i As Integer = 1 To 10
.WriteStartElement("Id")
.WriteString(i)
.WriteStartElement("Nom")
.WriteString("Nom " & i)
.WriteEndElement()
.WriteStartElement("prenom")
.WriteString("Prenom " & i)
.WriteEndElement()
.WriteStartElement("Adresse")
.WriteString("Adresse " & i)
.WriteEndElement()
.WriteEndElement()
Next

.WriteEndElement()
.WriteEndElement()
.WriteEndDocument()
.Close()
End With
MsgBox("fichier a été généré avec succès", vbInformation)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
when I generated the xml file I have got like this format:

<declarationrelevededuction><identifiantfiscal>111111<annee>2016<periode>8<regime>1<relvededution><id>1<nom>Nom 1<prenom>Prenom 1<adresse>Adresse 1<id>2<nom>Nom 2<prenom>Prenom 2<adresse>Adresse 2<id>3<nom>Nom 3<prenom>Prenom 3<adresse>Adresse 3<id>4<nom>Nom 4<prenom>Prenom 4<adresse>Adresse 4<id>5<nom>Nom 5<prenom>Prenom 5<adresse>Adresse 5<id>6<nom>Nom 6<prenom>Prenom 6<adresse>Adresse 6<id>7<nom>Nom 7<prenom>Prenom 7<adresse>Adresse 7<id>8<nom>Nom 8<prenom>Prenom 8<adresse>Adresse 8<id>9<nom>Nom 9<prenom>Prenom 9<adresse>Adresse 9<id>10<nom>Nom 10<prenom>Prenom 10<adresse>Adresse 10



Please help me I need to do that in this days of current month Cry | Cry | :(( Confused | Confused | :confused:
Rant[REPOST] How to generate XML file with serialisation in vb.net Pin
Richard Deeming19-Oct-16 10:28
mveRichard Deeming19-Oct-16 10:28 
QuestionTransform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Member 1278840611-Oct-16 16:21
MemberMember 1278840611-Oct-16 16:21 
AnswerRe: Transform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Richard Deeming12-Oct-16 4:26
mveRichard Deeming12-Oct-16 4:26 
QuestionRead xml string Pin
trungysp198610-Oct-16 15:48
Membertrungysp198610-Oct-16 15:48 
AnswerRe: Read xml string Pin
Richard MacCutchan10-Oct-16 22:54
mveRichard MacCutchan10-Oct-16 22:54 
AnswerRe: Read xml string Pin
Swinkaran11-Oct-16 17:09
professionalSwinkaran11-Oct-16 17:09 
QuestionXML Pin
Member 1273144310-Sep-16 4:41
MemberMember 1273144310-Sep-16 4:41 
AnswerRe: XML Pin
OriginalGriff10-Sep-16 4:44
mveOriginalGriff10-Sep-16 4:44 
GeneralRe: XML Pin
Member 1273144310-Sep-16 4:48
MemberMember 1273144310-Sep-16 4:48 
GeneralRe: XML Pin
Member 1273144310-Sep-16 4:52
MemberMember 1273144310-Sep-16 4:52 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 5:06
mveOriginalGriff10-Sep-16 5:06 
GeneralRe: XML Pin
Member 1273144310-Sep-16 5:18
MemberMember 1273144310-Sep-16 5:18 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 5:27
mveOriginalGriff10-Sep-16 5:27 
GeneralRe: XML Pin
Member 1273144310-Sep-16 5:38
MemberMember 1273144310-Sep-16 5:38 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 5:45
mveOriginalGriff10-Sep-16 5:45 
GeneralRe: XML Pin
Member 1273144310-Sep-16 5:49
MemberMember 1273144310-Sep-16 5:49 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 6:11
mveOriginalGriff10-Sep-16 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.