ssis xml encoding issue

zerofb

New Member
I am having an issue which a lot of people seem to be having, using a web service to create an XML file but the problem I have is that the encoding is all wrong and not proper XML:so it looks like this:\[code\] <?xml version="1.0" encoding="utf-16"?><string><!--This file generated by XMLPull tool on 06/28/2012 05:01:21 AM--><!--Datasource: Ticket--><DATASET><DATAROW><TicketDesc>TEST TICKET</TicketDesc></DATAROW></DATASET></string>\[/code\]instead of \[code\]<?xml version="1.0" encoding="UTF-16"?><!--This file generated by the XMLPull tool on 6/28/2012--><!--Datasource: Ticket--><DATASET><DATAROW TicketDesc="TEST TICKET></DATASET>\[/code\]and the schema used:\[code\]<?xml version="1.0"?><xsd:schema id="DATASET" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="http://stackoverflow.com/questions/11245672/urn:schemas-microsoft-com:xml-msdata"><xsd:element name="DATASET"> <xsd:complexType> <xsd:sequence> <xsd:element ref="DATAROW" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType></xsd:element><xsd:element name="DATAROW"> <xsd:annotation> <xsd:appinfo/> </xsd:annotation> <xsd:complexType> <xsd:attribute name="TicketDesc"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="http://stackoverflow.com/questions/11245672/2048"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType></xsd:element></xsd:schema>\[/code\]So the file seems to come in wrong from the webservice (with html markup?)how can I change the schema above to match this: \[code\]<?xml version="1.0" encoding="UTF-16"?><!--This file generated by the XMLPull tool on 6/28/2012--><!--Datasource: Ticket--><DATASET><DATAROW TicketDesc="TEST TICKET></DATASET>\[/code\]I have tried messing around with XML Task and XPATH in SSIS but the formatting is still wrong.
 
Back
Top