Builder::XmlMarkup adds <inspect/> on printing and <clone/> on saving


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 "". Despite
the last line, everything is fine with the code below.

With "" two entries "<clone/>" are added at the end
of How can I avoid these entries? Printing has a
similar effect. In that case "<inspect/>" is added every time I print.

Locking forward to your hints


**** code example **** =
    myxml =>, :indent=>2)

    myxml.instruct! #:xml, :version=>"1.0"
      for row in parsed # contains rows of a parsed .csv file
        myxml.OpenShipment("ShipmentOption"=>"", "ProcessStatus"=>"")
          myxml.ShipTo do
            myxml.Address1(row [1])
            myxml.Address2(row [2])
            myxml.PostalCode(row [3])
            myxml.CityOrTown(row [4])
          myxml.ShipmentInformation do
          myxml.Package do
            myxml.Weight(row [5])

If is just supposed to contain the text of the markup - it's shouldn't be an instnace of Builder::XmlMarkup. It can be anything that responds to <<, for example a String or a File (Builder::XMLMarkup also responds to << which is why this works at all.


you are right, I am only interested in teh text of the markup. Do you
have a short hint how to change my code?


I've no idea what your file transfer class is, but changing the first line to = ""
would probably be a step in the right direction


Thanks Fred! It works