Hello,
I am new in this group. Please give me a short hint, in case this is
the wrong place for my posting.
I want to create an XML file and store it in “filetransfer”. The XML
part of the file (the body) sould go to “filetransfer.data”. Despite
the last line, everything is fine with the code below.
With “filetransfer.save” two entries “” are added at the end
of filetransfer.data. How can I avoid these entries? Printing has a
similar effect. In that case “” is added every time I print.
Locking forward to your hints
SUzB
**** code example ****
filetransfer.data = Builder::XmlMarkup.new
myxml =
Builder::XmlMarkup.new(:target=>filetransfer.data, :indent=>2)
myxml.instruct! #:xml, :version=>"1.0"
myxml.OpenShipments("xmlns"=>"x-schema:OpenShipments.xdr"){
for row in parsed # contains rows of a parsed .csv file
myxml.OpenShipment("ShipmentOption"=>"", "ProcessStatus"=>"")
do
myxml.ShipTo do
myxml.CompanyOrName(row[0])
myxml.Address1(row [1])
myxml.Address2(row [2])
myxml.CountryTerritory(“DE”)
myxml.PostalCode(row [3])
myxml.CityOrTown(row [4])
end
myxml.ShipmentInformation do
myxml.ServiceType(“ES”)
myxml.NumberOfPackages(“1”)
myxml.BillingOption(“PP”)
end
myxml.Package do
myxml.PackageType(“CP”)
myxml.Weight(row [5])
end
end
end
}
filetransfer.save