Hi,
I have to create a pdf file by usinge an xml schema that looks like this:
----------------------------------------------------
Notice:
2009.10.09 - Testuser:
This is the first Notice.
2009.10.10 - Testuser2:
This is the second Notice.
2009.10.10 - Testuser1:
This is the third Notice.
-----------------------------------------------------
But by using an xml schema all I get is this:
-----------------------------------------------------
Notice:
2009.10.09 - Testuser:
2009.10.10 - Testuser2:
2009.10.10 - Testuser1:
This is the first Notice.
This is the second Notice.
This is the third Notice.
------------------------------------------------------
What is the proper way to get the rigth result? Used source code below. Thanks, Daniel
schema.xml:
<?xml version="1.0" encoding="UTF-8"?>
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="aspose.pdf.xml">
Private Sub create_notice_folder(ByVal MyExportDaten() As startExport.sExport_Daten, ByVal myindex As Integer, ByRef PagesCountBeforeAddThis As Integer)
Dim mycover As New Pdf
mycover.BindXML("schema.xml", Nothing)
Dim sec1 As Section = mycover.Sections("Content")
Dim t1 As Text = sec1.Paragraphs("NoticeTitle")
Dim t2 As Text = sec1.Paragraphs("NoticeSubTitle")
Dim t3 As Text = sec1.Paragraphs("NoticeValue")
Dim MyText As String = ""
myText = "Notice:" + Environment.NewLine + Environment.NewLine
t1.Segments.Add(MyText)
If MyExportDaten(myindex).Notizen.notizen IsNot Nothing Then
For i = 0 To MyExportDaten(myindex).Notice.Notices.Length - 1
MyText = MyExportDaten(myindex).Notice.Notices(i).Date + " - " + MyExportDaten(myindex).Notice.Notices(i).Creator + ":" + Environment.NewLine + Environment.NewLine
t2.Segments.Add(MyText)
MyText = MyExportDaten(myindex).Notice.Notices(i).Text + Environment.NewLine + Environment.NewLine + Environment.NewLine
t3.Segments.Add(MyText)
Next
Dim id As String = Guid.NewGuid.ToString
Dim myname As String = My.Computer.FileSystem.SpecialDirectories.Temp + "\" + id + ".tmp"
Dim myStream As FileStream = New FileStream(myname, FileMode.Create)
mycover.Save(myStream)
add2ExportObject(myStream, myname)
mycover = Nothing
t1 = Nothing
sec1 = Nothing
End If
End Sub