judsonV
asked on
Replacing special XML characters in vb.net
I've got a website where a user needs to print details from a customer info screen onto an envelope to be mailed to said customer.
I have an xml template doc that is on the server and a function that pulls info from the customer form and makes strings (name and address strings) and places those into the template. When the button is clicked to generate it opens an instance of MS Word on their local machine and allows them to print the envelope with all the details entered for them.
The only issue now is when you have an address or company name with a "&" in it the function crashes out as the "&" is a special character in XML. What's the best way to compare the string and replace the "&"? I'll give the code example below:
Public Shared Function CreateEnvelopeForPrint(ByV al LicenceFormParam As LicenceForm, ByVal TemplateStringParam As String) As String
Dim Addr1 As String = ""
Dim Addr2 As String = ""
Dim Addr3 As String = ""
Dim Addr4 As String = ""
Dim Addr5 As String = ""
With LicenceFormParam
''Creating the strings to hold the customer's names and addresses
Dim PrimaryOwner As String = .PrimaryFirstName + " " + .PrimaryLastName
Dim SecondaryOwner As String = .SecondaryFirstName + " " + .SecondaryLastName
' Build line that contains place, province/state and postal code
Dim PlaceLineStr As String
If .ProvinceCode.Equals("99") Then
PlaceLineStr = .PlaceName + ", " + .CountryName
Else
PlaceLineStr = .PlaceName + " " + .ProvinceCode + " " + .PostalCode
End If
If (.EnterpriseName <> "") Then
Addr1 = .EnterpriseName
If (.PrimaryLastName <> "") Then
Addr2 = PrimaryOwner
If (.SecondaryLastName <> "") Then
Addr2 = Addr2 + " / " + SecondaryOwner
End If
Else
Addr2 = .AddressLine1
End If
Else
Addr1 = PrimaryOwner
If (.SecondaryLastName <> "") Then
Addr1 = Addr1 + " / " + SecondaryOwner
End If
Addr2 = .AddressLine1
End If
If Addr2 = .AddressLine1 Then
If .AddressLine2 <> "" Then
Addr3 = .AddressLine2
Addr4 = PlaceLineStr
Else
Addr3 = PlaceLineStr
End If
Else
Addr3 = .AddressLine1
If .AddressLine2 <> "" Then
Addr4 = .AddressLine2
Addr5 = PlaceLineStr
Else
Addr4 = PlaceLineStr
End If
End If
End With
'Replace lines $ADDRX$ place holders in template with the appropriate upper case line built above
TemplateStringParam = TemplateStringParam.Replac e("$ADDR1$ ", Addr1.ToUpper)
TemplateStringParam = TemplateStringParam.Replac e("$ADDR2$ ", Addr2.ToUpper)
TemplateStringParam = TemplateStringParam.Replac e("$ADDR3$ ", Addr3.ToUpper)
TemplateStringParam = TemplateStringParam.Replac e("$ADDR4$ ", Addr4.ToUpper)
TemplateStringParam = TemplateStringParam.Replac e("$ADDR5$ ", Addr5.ToUpper)
Return TemplateStringParam
End Function
I have an xml template doc that is on the server and a function that pulls info from the customer form and makes strings (name and address strings) and places those into the template. When the button is clicked to generate it opens an instance of MS Word on their local machine and allows them to print the envelope with all the details entered for them.
The only issue now is when you have an address or company name with a "&" in it the function crashes out as the "&" is a special character in XML. What's the best way to compare the string and replace the "&"? I'll give the code example below:
Public Shared Function CreateEnvelopeForPrint(ByV
Dim Addr1 As String = ""
Dim Addr2 As String = ""
Dim Addr3 As String = ""
Dim Addr4 As String = ""
Dim Addr5 As String = ""
With LicenceFormParam
''Creating the strings to hold the customer's names and addresses
Dim PrimaryOwner As String = .PrimaryFirstName + " " + .PrimaryLastName
Dim SecondaryOwner As String = .SecondaryFirstName + " " + .SecondaryLastName
' Build line that contains place, province/state and postal code
Dim PlaceLineStr As String
If .ProvinceCode.Equals("99")
PlaceLineStr = .PlaceName + ", " + .CountryName
Else
PlaceLineStr = .PlaceName + " " + .ProvinceCode + " " + .PostalCode
End If
If (.EnterpriseName <> "") Then
Addr1 = .EnterpriseName
If (.PrimaryLastName <> "") Then
Addr2 = PrimaryOwner
If (.SecondaryLastName <> "") Then
Addr2 = Addr2 + " / " + SecondaryOwner
End If
Else
Addr2 = .AddressLine1
End If
Else
Addr1 = PrimaryOwner
If (.SecondaryLastName <> "") Then
Addr1 = Addr1 + " / " + SecondaryOwner
End If
Addr2 = .AddressLine1
End If
If Addr2 = .AddressLine1 Then
If .AddressLine2 <> "" Then
Addr3 = .AddressLine2
Addr4 = PlaceLineStr
Else
Addr3 = PlaceLineStr
End If
Else
Addr3 = .AddressLine1
If .AddressLine2 <> "" Then
Addr4 = .AddressLine2
Addr5 = PlaceLineStr
Else
Addr4 = PlaceLineStr
End If
End If
End With
'Replace lines $ADDRX$ place holders in template with the appropriate upper case line built above
TemplateStringParam = TemplateStringParam.Replac
TemplateStringParam = TemplateStringParam.Replac
TemplateStringParam = TemplateStringParam.Replac
TemplateStringParam = TemplateStringParam.Replac
TemplateStringParam = TemplateStringParam.Replac
Return TemplateStringParam
End Function
Just replace & with & - that's what I do in my application and it works okay.
Replace & with &
Refer: http://support.microsoft.com/kb/316063
Refer: http://support.microsoft.com/kb/316063
ASKER
It still crashes out using the replace string. I declared a new variable
Dim replaceChar1 As String = "&"
Then after I build the address string i use this:
Dim Addr1_replace As String = Addr1.Replace("&", replaceChar1)
Then
TemplateStringParam = TemplateStringParam.Replac e("$ADDR1$ ", Addr1_replace.ToUpper)
then I return the templatestring param to be written and when word opens I still get the error stating the file cant be opened as their is problems with the template
Dim replaceChar1 As String = "&"
Then after I build the address string i use this:
Dim Addr1_replace As String = Addr1.Replace("&", replaceChar1)
Then
TemplateStringParam = TemplateStringParam.Replac
then I return the templatestring param to be written and when word opens I still get the error stating the file cant be opened as their is problems with the template
Can you get the entire encoded XML and paste it here? There may well be other issues in there
ASKER
You mean this?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="applicati on/vnd.ope nxmlformat s-package. relationsh ips+xml" pkg:padding="512"><pkg:xml Data><Rela tionships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/ ><Relation ship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /><Relatio nship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml" /></Relati onships></ pkg:xmlDat a></pkg:pa rt><pkg:pa rt pkg:name="/word/_rels/docu ment.xml.r els" pkg:contentType="applicati on/vnd.ope nxmlformat s-package. relationsh ips+xml" pkg:padding="256"><pkg:xml Data><Rela tionships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/><Re lationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Rela tionship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml" Target="../customXml/item1 .xml"/><Re lationship Id="rId6" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/ ><Relation ship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Target="fontTable.xml"/><R elationshi p Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml"/> </Relation ships></pk g:xmlData> </pkg:part ><pkg:part pkg:name="/word/document.x ml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.wor dprocessin gml.docume nt.main+xm l"><pkg:xm lData><w:d ocument xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-micro soft-com:o ffice:offi ce" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-micro soft-com:v ml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-mic rosoft-com :office:wo rd" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"><w:body><w:p w:rsidR="005F4D45" w:rsidRDefault="005F4D45" w:rsidP="00F23883"><w:pPr> <w:pStyle w:val="EnvelopeReturn"/><w :framePr w:w="6585" w:h="1816" w:hRule="exact" w:hSpace="187" w:wrap="around" w:x="1134" w:y="2101"/><w:rPr><w:lang w:val="fr-CA"/></w:rPr></w :pPr></w:p ><w:p w:rsidR="005F4D45" w:rsidRPr="00D4460A" w:rsidRDefault="005F4D45" w:rsidP="00F23883"><w:pPr> <w:pStyle w:val="EnvelopeReturn"/><w :framePr w:w="6585" w:h="1816" w:hRule="exact" w:hSpace="187" w:wrap="around" w:x="1134" w:y="2101"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:lang w:val="fr-CA"/></w:rPr></w :pPr><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:lang w:val="fr-CA"/></w:rPr><w: t>PLEASURE CRAFT LICENCE CENTRE</w:t></w:r></w:p><w :p w:rsidR="005F4D45" w:rsidRPr="00D4460A" w:rsidRDefault="005F4D45" w:rsidP="00F23883"><w:pPr> <w:pStyle w:val="EnvelopeReturn"/><w :framePr w:w="6585" w:h="1816" w:hRule="exact" w:hSpace="187" w:wrap="around" w:x="1134" w:y="2101"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:lang w:val="fr-CA"/></w:rPr></w :pPr><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:lang w:val="fr-CA"/></w:rPr><w: t>CENTRE DE PERMIS D'EMBARCATION DE PLAISANCE</w:t></w:r></w:p ><w:p w:rsidR="005F4D45" w:rsidRPr="00D4460A" w:rsidRDefault="005F4D45" w:rsidP="00F23883"><w:pPr> <w:pStyle w:val="EnvelopeReturn"/><w :framePr w:w="6585" w:h="1816" w:hRule="exact" w:hSpace="187" w:wrap="around" w:x="1134" w:y="2101"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr></w: pPr><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr><w:t >P.O. BOX / C.P. 2006</w:t></w:r></w:p><w:p w:rsidR="005F4D45" w:rsidRPr="00D4460A" w:rsidRDefault="005F4D45" w:rsidP="00F23883"><w:pPr> <w:pStyle w:val="EnvelopeReturn"/><w :framePr w:w="6585" w:h="1816" w:hRule="exact" w:hSpace="187" w:wrap="around" w:x="1134" w:y="2101"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr></w: pPr><w:r>< w:rPr><w:r Fonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr><w:t xml:space="preserve">FREDE RICTON </w:t></w:r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr><w:t xml:space="preserve">NB </w:t></w:r><w:r w:rsidR="00F23883"><w:rPr> <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr><w:t xml:space="preserve"> </w:t></w:r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/></w:rPr><w:t >E3B 5G4</w:t></w:r></w:p><w:p w:rsidR="005A5A77" w:rsidRDefault="005A5A77"> <w:pPr><w: spacing w:after="0" w:line="240" w:lineRule="auto"/></w:pPr ></w:p><w: p w:rsidR="00330E92" w:rsidRDefault="00330E92" w:rsidP="005A5A77"/><w:p w:rsidR="00330E92" w:rsidRPr="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00330E92" w:rsidRPr="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00330E92" w:rsidRPr="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00330E92" w:rsidRPr="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"><w:pPr> <w:tabs><w :tab w:val="left" w:pos="5925"/></w:tabs></w :pPr><w:r> <w:tab/></ w:r></w:p> <w:p w:rsidR="00330E92" w:rsidRDefault="00330E92" w:rsidP="00330E92"/><w:p w:rsidR="00364514" w:rsidRPr="00D4460A" w:rsidRDefault="00364514" w:rsidP="00364514"><w:pPr> <w:pStyle w:val="EnvelopeAddress"/>< w:framePr w:w="12436" w:wrap="auto" w:x="4396" w:y="6076"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr></w:pP r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr><w:t>$ ADDR1$</w: t></w:r></ w:p><w:p w:rsidR="00364514" w:rsidRPr="00D4460A" w:rsidRDefault="00364514" w:rsidP="00364514"><w:pPr> <w:pStyle w:val="EnvelopeAddress"/>< w:framePr w:w="12436" w:wrap="auto" w:x="4396" w:y="6076"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr></w:pP r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr><w:t>$ ADDR2$</w: t></w:r></ w:p><w:p w:rsidR="00364514" w:rsidRPr="00D4460A" w:rsidRDefault="00364514" w:rsidP="00364514"><w:pPr> <w:pStyle w:val="EnvelopeAddress"/>< w:framePr w:w="12436" w:wrap="auto" w:x="4396" w:y="6076"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr></w:pP r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr><w:t>$ ADDR3$</w: t></w:r></ w:p><w:p w:rsidR="00364514" w:rsidRPr="00D4460A" w:rsidRDefault="00364514" w:rsidP="00364514"><w:pPr> <w:pStyle w:val="EnvelopeAddress"/>< w:framePr w:w="12436" w:wrap="auto" w:x="4396" w:y="6076"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr></w:pP r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr><w:t>$ ADDR4$</w: t></w:r></ w:p><w:p w:rsidR="00472524" w:rsidRPr="00D4460A" w:rsidRDefault="00364514" w:rsidP="00364514"><w:pPr> <w:pStyle w:val="EnvelopeAddress"/>< w:framePr w:w="12436" w:wrap="auto" w:x="4396" w:y="6076"/><w:rPr><w:rFon ts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr></w:pP r><w:r w:rsidRPr="00D4460A"><w:rP r><w:rFont s w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/><w:sz w:val="24"/></w:rPr><w:t>$ ADDR5$</w: t></w:r></ w:p><w:p w:rsidR="003E47C1" w:rsidRPr="00EB6E01" w:rsidRDefault="003E47C1"/ ><w:sectPr w:rsidR="003E47C1" w:rsidRPr="00EB6E01" w:rsidSect="00924820"><w:p gSz w:w="17280" w:h="12960" w:orient="landscape" w:code="56"/><w:pgMar w:top="2160" w:right="1440" w:bottom="1440" w:left="1080" w:header="720" w:footer="720" w:gutter="0"/><w:paperSrc w:first="15" w:other="15"/><w:cols w:space="720"/><w:docGrid w:linePitch="360"/></w:sec tPr></w:bo dy></w:doc ument></pk g:xmlData> </pkg:part ><pkg:part pkg:name="/word/theme/them e1.xml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.the me+xml"><p kg:xmlData ><a:theme name="Office Theme" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:themeElement s><a:clrSc heme name="Office"><a:dk1><a:sy sClr val="windowText" lastClr="000000"/></a:dk1> <a:lt1><a: sysClr val="window" lastClr="FFFFFF"/></a:lt1> <a:dk2><a: srgbClr val="1F497D"/></a:dk2><a:l t2><a:srgb Clr val="EEECE1"/></a:lt2><a:a ccent1><a: srgbClr val="4F81BD"/></a:accent1> <a:accent2 ><a:srgbCl r val="C0504D"/></a:accent2> <a:accent3 ><a:srgbCl r val="9BBB59"/></a:accent3> <a:accent4 ><a:srgbCl r val="8064A2"/></a:accent4> <a:accent5 ><a:srgbCl r val="4BACC6"/></a:accent5> <a:accent6 ><a:srgbCl r val="F79646"/></a:accent6> <a:hlink>< a:srgbClr val="0000FF"/></a:hlink><a :folHlink> <a:srgbClr val="800080"/></a:folHlink ></a:clrSc heme><a:fo ntScheme name="Office"><a:majorFont ><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS ¿¿¿¿"/><a:font script="Hang" typeface="¿¿ ¿¿"/><a:font script="Hans" typeface="¿¿"/><a:font script="Hant" typeface="¿¿¿¿"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:f ont script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:fo nt script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:fon t script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:fon t script="Mlym" typeface="Kartika"/><a:fon t script="Laoo" typeface="DokChampa"/><a:f ont script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:majorFont><a: minorFont> <a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS ¿¿"/><a:font script="Hang" typeface="¿¿ ¿¿"/><a:font script="Hans" typeface="¿¿"/><a:font script="Hant" typeface="¿¿¿¿"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:fo nt script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:fo nt script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:fon t script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:fon t script="Mlym" typeface="Kartika"/><a:fon t script="Laoo" typeface="DokChampa"/><a:f ont script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:minorFont></a :fontSchem e><a:fmtSc heme name="Office"><a:fillStyle Lst><a:sol idFill><a: schemeClr val="phClr"/></a:solidFill ><a:gradFi ll rotWithShape="1"><a:gsLst> <a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeCl r></a:gs>< a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeCl r></a:gs>< a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeCl r></a:gs>< /a:gsLst>< a:lin ang="16200000" scaled="1"/></a:gradFill>< a:gradFill rotWithShape="1"><a:gsLst> <a:gs pos="0"><a:schemeClr val="phClr"><a:shade val="51000"/><a:satMod val="130000"/></a:schemeCl r></a:gs>< a:gs pos="80000"><a:schemeClr val="phClr"><a:shade val="93000"/><a:satMod val="130000"/></a:schemeCl r></a:gs>< a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="94000"/><a:satMod val="135000"/></a:schemeCl r></a:gs>< /a:gsLst>< a:lin ang="16200000" scaled="0"/></a:gradFill>< /a:fillSty leLst><a:l nStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a :schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeCl r></a:soli dFill><a:p rstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a :schemeClr val="phClr"/></a:solidFill ><a:prstDa sh val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a :schemeClr val="phClr"/></a:solidFill ><a:prstDa sh val="solid"/></a:ln></a:ln StyleLst>< a:effectSt yleLst><a: effectStyl e><a:effec tLst><a:ou terShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbCl r val="000000"><a:alpha val="38000"/></a:srgbClr>< /a:outerSh dw></a:eff ectLst></a :effectSty le><a:effe ctStyle><a :effectLst ><a:outerS hdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbCl r val="000000"><a:alpha val="35000"/></a:srgbClr>< /a:outerSh dw></a:eff ectLst></a :effectSty le><a:effe ctStyle><a :effectLst ><a:outerS hdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbCl r val="000000"><a:alpha val="35000"/></a:srgbClr>< /a:outerSh dw></a:eff ectLst><a: scene3d><a :camera prst="orthographicFront">< a:rot lat="0" lon="0" rev="0"/></a:camera><a:lig htRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRi g></a:scen e3d><a:sp3 d><a:bevel T w="63500" h="25400"/></a:sp3d></a:ef fectStyle> </a:effect StyleLst>< a:bgFillSt yleLst><a: solidFill> <a:schemeC lr val="phClr"/></a:solidFill ><a:gradFi ll rotWithShape="1"><a:gsLst> <a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeCl r></a:gs>< a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeCl r></a:gs>< a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeCl r></a:gs>< /a:gsLst>< a:path path="circle"><a:fillToRec t l="50000" t="-80000" r="50000" b="180000"/></a:path></a:g radFill><a :gradFill rotWithShape="1"><a:gsLst> <a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeCl r></a:gs>< a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeCl r></a:gs>< /a:gsLst>< a:path path="circle"><a:fillToRec t l="50000" t="50000" r="50000" b="50000"/></a:path></a:gr adFill></a :bgFillSty leLst></a: fmtScheme> </a:themeE lements><a :objectDef aults/><a: extraClrSc hemeLst/>< /a:theme>< /pkg:xmlDa ta></pkg:p art><pkg:p art pkg:name="/word/settings.x ml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.wor dprocessin gml.settin gs+xml"><p kg:xmlData ><w:settin gs xmlns:o="urn:schemas-micro soft-com:o ffice:offi ce" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-micro soft-com:v ml" xmlns:w10="urn:schemas-mic rosoft-com :office:wo rd" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main"><w:zoom w:percent="100"/><w:proofS tate w:spelling="clean" w:grammar="clean"/><w:defa ultTabStop w:val="720"/><w:drawingGri dHorizonta lSpacing w:val="110"/><w:displayHor izontalDra wingGridEv ery w:val="2"/><w:characterSpa cingContro l w:val="doNotCompress"/><w: compat/><w :rsids><w: rsidRoot w:val="009A34D6"/><w:rsid w:val="0004255F"/><w:rsid w:val="00065BC9"/><w:rsid w:val="000763DB"/><w:rsid w:val="0009533E"/><w:rsid w:val="000E6F09"/><w:rsid w:val="001A2E73"/><w:rsid w:val="001E211D"/><w:rsid w:val="00211224"/><w:rsid w:val="0022300F"/><w:rsid w:val="002C558C"/><w:rsid w:val="002C7696"/><w:rsid w:val="00311F86"/><w:rsid w:val="00325BC5"/><w:rsid w:val="00330E92"/><w:rsid w:val="00364514"/><w:rsid w:val="0038609C"/><w:rsid w:val="003D3BA5"/><w:rsid w:val="003E1D2C"/><w:rsid w:val="003E47C1"/><w:rsid w:val="00472524"/><w:rsid w:val="004A0416"/><w:rsid w:val="004F424A"/><w:rsid w:val="0050252F"/><w:rsid w:val="00507D91"/><w:rsid w:val="00517E94"/><w:rsid w:val="00587C16"/><w:rsid w:val="00587F62"/><w:rsid w:val="00593AD6"/><w:rsid w:val="005A5A77"/><w:rsid w:val="005B3F94"/><w:rsid w:val="005C3B60"/><w:rsid w:val="005F4D45"/><w:rsid w:val="00602D7F"/><w:rsid w:val="006243D1"/><w:rsid w:val="0066121F"/><w:rsid w:val="006772DF"/><w:rsid w:val="006817D1"/><w:rsid w:val="00705C93"/><w:rsid w:val="00725094"/><w:rsid w:val="00791988"/><w:rsid w:val="00824A08"/><w:rsid w:val="00854EBA"/><w:rsid w:val="008B4B24"/><w:rsid w:val="008B5100"/><w:rsid w:val="008C67F9"/><w:rsid w:val="00924820"/><w:rsid w:val="00924B06"/><w:rsid w:val="00942874"/><w:rsid w:val="009511C5"/><w:rsid w:val="009A34D6"/><w:rsid w:val="00A0380C"/><w:rsid w:val="00A1229E"/><w:rsid w:val="00A15E05"/><w:rsid w:val="00A178C4"/><w:rsid w:val="00A91AB1"/><w:rsid w:val="00B7686E"/><w:rsid w:val="00D1488B"/><w:rsid w:val="00D4460A"/><w:rsid w:val="00D56CA3"/><w:rsid w:val="00D63128"/><w:rsid w:val="00D92461"/><w:rsid w:val="00D9489B"/><w:rsid w:val="00DC1BF3"/><w:rsid w:val="00E13731"/><w:rsid w:val="00E52E3A"/><w:rsid w:val="00E63CB9"/><w:rsid w:val="00EB6E01"/><w:rsid w:val="00F23883"/><w:rsid w:val="00F37E47"/><w:rsid w:val="00F709F5"/><w:rsid w:val="00FE6917"/></w:rsid s><m:mathP r><m:mathF ont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinS ub m:val="--"/><m:smallFrac m:val="off"/><m:dispDef/>< m:lMargin m:val="0"/><m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wr apIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr ><w:themeF ontLang w:val="en-US"/><w:clrSchem eMapping w:bg1="light1" w:t1="dark1" w:bg2="light2" w:t2="dark2" w:accent1="accent1" w:accent2="accent2" w:accent3="accent3" w:accent4="accent4" w:accent5="accent5" w:accent6="accent6" w:hyperlink="hyperlink" w:followedHyperlink="follo wedHyperli nk"/><w:sh apeDefault s><o:shape defaults v:ext="edit" spidmax="20482"/><o:shapel ayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout> </w:shapeD efaults><w :decimalSy mbol w:val="."/><w:listSeparato r w:val=","/></w:settings></ pkg:xmlDat a></pkg:pa rt><pkg:pa rt pkg:name="/customXml/_rels /item1.xml .rels" pkg:contentType="applicati on/vnd.ope nxmlformat s-package. relationsh ips+xml" pkg:padding="256"><pkg:xml Data><Rela tionships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps" Target="itemProps1.xml"/>< /Relations hips></pkg :xmlData>< /pkg:part> <pkg:part pkg:name="/customXml/itemP rops1.xml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.cus tomXmlProp erties+xml " pkg:padding="32"><pkg:xmlD ata pkg:originalXmlStandalone= "no"><ds:d atastoreIt em ds:itemID="{75B3D116-36BD- 4F70-9BC4- 77A154DB34 38}" xmlns:ds="http://schemas.openxmlformats.org/officeDocument/2006/customXml"><ds:schemaRefs ><ds:schem aRef ds:uri="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"/></ds:schemaRefs ></ds:data storeItem> </pkg:xmlD ata></pkg: part><pkg: part pkg:name="/word/styles.xml " pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.wor dprocessin gml.styles +xml"><pkg :xmlData>< w:styles xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:docDefaults> <w:rPrDefa ult><w:rPr ><w:rFonts w:asciiTheme="minorHAnsi" w:eastAsiaTheme="minorHAns i" w:hAnsiTheme="minorHAnsi" w:cstheme="minorBidi"/><w: sz w:val="22"/><w:szCs w:val="22"/><w:lang w:val="en-US" w:eastAsia="en-US" w:bidi="ar-SA"/></w:rPr></ w:rPrDefau lt><w:pPrD efault><w: pPr><w:spa cing w:after="200" w:line="276" w:lineRule="auto"/></w:pPr ></w:pPrDe fault></w: docDefault s><w:laten tStyles w:defLockedState="0" w:defUIPriority="99" w:defSemiHidden="1" w:defUnhideWhenUsed="1" w:defQFormat="0" w:count="267"><w:lsdExcept ion w:name="Normal" w:semiHidden="0" w:uiPriority="0" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="heading 1" w:semiHidden="0" w:uiPriority="9" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="heading 2" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 3" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 4" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 5" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 6" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 7" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 8" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="heading 9" w:uiPriority="9" w:qFormat="1"/><w:lsdExcep tion w:name="toc 1" w:uiPriority="39"/><w:lsdE xception w:name="toc 2" w:uiPriority="39"/><w:lsdE xception w:name="toc 3" w:uiPriority="39"/><w:lsdE xception w:name="toc 4" w:uiPriority="39"/><w:lsdE xception w:name="toc 5" w:uiPriority="39"/><w:lsdE xception w:name="toc 6" w:uiPriority="39"/><w:lsdE xception w:name="toc 7" w:uiPriority="39"/><w:lsdE xception w:name="toc 8" w:uiPriority="39"/><w:lsdE xception w:name="toc 9" w:uiPriority="39"/><w:lsdE xception w:name="caption" w:uiPriority="35" w:qFormat="1"/><w:lsdExcep tion w:name="Title" w:semiHidden="0" w:uiPriority="10" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Default Paragraph Font" w:uiPriority="1"/><w:lsdEx ception w:name="Subtitle" w:semiHidden="0" w:uiPriority="11" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Strong" w:semiHidden="0" w:uiPriority="22" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Emphasis" w:semiHidden="0" w:uiPriority="20" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Table Grid" w:semiHidden="0" w:uiPriority="59" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Placeholder Text" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="No Spacing" w:semiHidden="0" w:uiPriority="1" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Light Shading" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 1" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 1" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 1" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 1" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 1" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 1" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Revision" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="List Paragraph" w:semiHidden="0" w:uiPriority="34" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Quote" w:semiHidden="0" w:uiPriority="29" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Intense Quote" w:semiHidden="0" w:uiPriority="30" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Medium List 2 Accent 1" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 1" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 1" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 1" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 1" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 1" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 1" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 1" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 2" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 2" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 2" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 2" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 2" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 2" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2 Accent 2" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 2" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 2" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 2" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 2" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 2" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 2" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 2" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 3" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 3" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 3" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 3" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 3" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 3" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2 Accent 3" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 3" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 3" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 3" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 3" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 3" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 3" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 3" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 4" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 4" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 4" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 4" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 4" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 4" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2 Accent 4" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 4" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 4" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 4" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 4" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 4" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 4" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 4" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 5" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 5" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 5" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 5" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 5" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 5" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2 Accent 5" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 5" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 5" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 5" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 5" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 5" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 5" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 5" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Shading Accent 6" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light List Accent 6" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Light Grid Accent 6" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 1 Accent 6" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Shading 2 Accent 6" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 1 Accent 6" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium List 2 Accent 6" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 1 Accent 6" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 2 Accent 6" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Medium Grid 3 Accent 6" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Dark List Accent 6" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Shading Accent 6" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful List Accent 6" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Colorful Grid Accent 6" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:l sdExceptio n w:name="Subtle Emphasis" w:semiHidden="0" w:uiPriority="19" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Intense Emphasis" w:semiHidden="0" w:uiPriority="21" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Subtle Reference" w:semiHidden="0" w:uiPriority="31" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Intense Reference" w:semiHidden="0" w:uiPriority="32" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Book Title" w:semiHidden="0" w:uiPriority="33" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcep tion w:name="Bibliography" w:uiPriority="37"/><w:lsdE xception w:name="TOC Heading" w:uiPriority="39" w:qFormat="1"/></w:latentS tyles><w:s tyle w:type="paragraph" w:default="1" w:styleId="Normal"><w:name w:val="Normal"/><w:qFormat /><w:rsid w:val="003E47C1"/></w:styl e><w:style w:type="character" w:default="1" w:styleId="DefaultParagrap hFont"><w: name w:val="Default Paragraph Font"/><w:uiPriority w:val="1"/><w:semiHidden/> <w:unhideW henUsed/>< /w:style>< w:style w:type="table" w:default="1" w:styleId="TableNormal"><w :name w:val="Normal Table"/><w:uiPriority w:val="99"/><w:semiHidden/ ><w:unhide WhenUsed/> <w:qFormat /><w:tblPr ><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMa r><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellM ar></w:tbl Pr></w:sty le><w:styl e w:type="numbering" w:default="1" w:styleId="NoList"><w:name w:val="No List"/><w:uiPriority w:val="99"/><w:semiHidden/ ><w:unhide WhenUsed/> </w:style> <w:style w:type="paragraph" w:styleId="EnvelopeAddress "><w:name w:val="envelope address"/><w:basedOn w:val="Normal"/><w:uiPrior ity w:val="99"/><w:unhideWhenU sed/><w:rs id w:val="005A5A77"/><w:pPr>< w:framePr w:w="7920" w:h="1980" w:hRule="exact" w:hSpace="180" w:wrap="auto" w:vAnchor="page" w:hAnchor="page" w:xAlign="center" w:y="6481"/><w:spacing w:after="0" w:line="240" w:lineRule="auto"/><w:ind w:left="2880"/></w:pPr><w: rPr><w:rFo nts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEast Asia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/><w: sz w:val="32"/><w:szCs w:val="24"/></w:rPr></w:st yle><w:sty le w:type="paragraph" w:styleId="EnvelopeReturn" ><w:name w:val="envelope return"/><w:basedOn w:val="Normal"/><w:uiPrior ity w:val="99"/><w:unhideWhenU sed/><w:rs id w:val="003D3BA5"/><w:pPr>< w:framePr w:w="4320" w:h="1440" w:hRule="exact" w:hSpace="180" w:wrap="auto" w:vAnchor="page" w:hAnchor="page" w:x="1081" w:y="2161"/><w:spacing w:after="0" w:line="240" w:lineRule="auto"/></w:pPr ><w:rPr><w :rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEast Asia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/><w: sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:st yle><w:sty le w:type="paragraph" w:styleId="BalloonText"><w :name w:val="Balloon Text"/><w:basedOn w:val="Normal"/><w:link w:val="BalloonTextChar"/>< w:uiPriori ty w:val="99"/><w:semiHidden/ ><w:unhide WhenUsed/> <w:rsid w:val="005A5A77"/><w:pPr>< w:spacing w:after="0" w:line="240" w:lineRule="auto"/></w:pPr ><w:rPr><w :rFonts w:ascii="Tahoma" w:hAnsi="Tahoma" w:cs="Tahoma"/><w:sz w:val="16"/><w:szCs w:val="16"/></w:rPr></w:st yle><w:sty le w:type="character" w:customStyle="1" w:styleId="BalloonTextChar "><w:name w:val="Balloon Text Char"/><w:basedOn w:val="DefaultParagraphFon t"/><w:lin k w:val="BalloonText"/><w:ui Priority w:val="99"/><w:semiHidden/ ><w:rsid w:val="005A5A77"/><w:rPr>< w:rFonts w:ascii="Tahoma" w:hAnsi="Tahoma" w:cs="Tahoma"/><w:sz w:val="16"/><w:szCs w:val="16"/></w:rPr></w:st yle></w:st yles></pkg :xmlData>< /pkg:part> <pkg:part pkg:name="/docProps/core.x ml" pkg:contentType="applicati on/vnd.ope nxmlformat s-package. core-prope rties+xml" pkg:padding="256"><pkg:xml Data><cp:c orePropert ies xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title/><d c:subject/ ><dc:creat or>dhousto n</dc:crea tor><cp:ke ywords/><d c:descript ion/><cp:l astModifie dBy>xjnico ll</cp:las tModifiedB y><cp:revi sion>3</cp :revision> <cp:lastPr inted>2011 -08-24T12: 25:00Z</cp :lastPrint ed><dcterm s:created xsi:type="dcterms:W3CDTF"> 2011-08-24 T13:15:00Z </dcterms: created><d cterms:mod ified xsi:type="dcterms:W3CDTF"> 2011-08-24 T13:15:00Z </dcterms: modified>< /cp:corePr operties>< /pkg:xmlDa ta></pkg:p art><pkg:p art pkg:name="/customXml/item1 .xml" pkg:contentType="applicati on/xml" pkg:padding="32"><pkg:xmlD ata><b:Sou rces SelectedStyle="\APA.XSL" StyleName="APA" xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"/></pkg:xmlData></ pkg:part>< pkg:part pkg:name="/word/fontTable. xml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.wor dprocessin gml.fontTa ble+xml">< pkg:xmlDat a><w:fonts xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:font w:name="Calibri"><w:panose 1 w:val="020F050202020403020 4"/><w:cha rset w:val="00"/><w:family w:val="swiss"/><w:pitch w:val="variable"/><w:sig w:usb0="A00002EF" w:usb1="4000207B" w:usb2="00000000" w:usb3="00000000" w:csb0="0000009F" w:csb1="00000000"/></w:fon t><w:font w:name="Times New Roman"><w:panose1 w:val="0202060305040502030 4"/><w:cha rset w:val="00"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="20002A87" w:usb1="80000000" w:usb2="00000008" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/></w:fon t><w:font w:name="Cambria"><w:panose 1 w:val="0204050305040603020 4"/><w:cha rset w:val="00"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="A00002EF" w:usb1="4000004B" w:usb2="00000000" w:usb3="00000000" w:csb0="0000009F" w:csb1="00000000"/></w:fon t><w:font w:name="Tahoma"><w:panose1 w:val="020B060403050404020 4"/><w:cha rset w:val="00"/><w:family w:val="swiss"/><w:notTrueT ype/><w:pi tch w:val="variable"/><w:sig w:usb0="00000003" w:usb1="00000000" w:usb2="00000000" w:usb3="00000000" w:csb0="00000001" w:csb1="00000000"/></w:fon t><w:font w:name="Arial"><w:panose1 w:val="020B060402020202020 4"/><w:cha rset w:val="00"/><w:family w:val="swiss"/><w:pitch w:val="variable"/><w:sig w:usb0="20002A87" w:usb1="80000000" w:usb2="00000008" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/></w:fon t></w:font s></pkg:xm lData></pk g:part><pk g:part pkg:name="/word/webSetting s.xml" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.wor dprocessin gml.webSet tings+xml" ><pkg:xmlD ata><w:web Settings xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:divs><w:div w:id="544409395"><w:bodyDi v w:val="1"/><w:marLeft w:val="0"/><w:marRight w:val="0"/><w:marTop w:val="0"/><w:marBottom w:val="0"/><w:divBdr><w:to p w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:left w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:bottom w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:right w:val="none" w:sz="0" w:space="0" w:color="auto"/></w:divBdr ></w:div>< w:div w:id="574166097"><w:bodyDi v w:val="1"/><w:marLeft w:val="0"/><w:marRight w:val="0"/><w:marTop w:val="0"/><w:marBottom w:val="0"/><w:divBdr><w:to p w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:left w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:bottom w:val="none" w:sz="0" w:space="0" w:color="auto"/><w:right w:val="none" w:sz="0" w:space="0" w:color="auto"/></w:divBdr ></w:div>< /w:divs><w :optimizeF orBrowser/ ><w:relyOn VML/><w:al lowPNG/></ w:webSetti ngs></pkg: xmlData></ pkg:part>< pkg:part pkg:name="/docProps/app.xm l" pkg:contentType="applicati on/vnd.ope nxmlformat s-officedo cument.ext ended-prop erties+xml " pkg:padding="256"><pkg:xml Data><Prop erties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Template>Norm al.dotm</T emplate><T otalTime>1 </TotalTim e><Pages>1 </Pages><W ords>25</W ords><Char acters>146 </Characte rs><Applic ation>Micr osoft Office Word</Application><DocSecu rity>0</Do cSecurity> <Lines>1</ Lines><Par agraphs>1< /Paragraph s><ScaleCr op>false</ ScaleCrop> <HeadingPa irs><vt:ve ctor size="2" baseType="variant"><vt:var iant><vt:l pstr>Title </vt:lpstr ></vt:vari ant><vt:va riant><vt: i4>1</vt:i 4></vt:var iant></vt: vector></H eadingPair s><TitlesO fParts><vt :vector size="1" baseType="lpstr"><vt:lpstr /></vt:vec tor></Titl esOfParts> <Company>S ervice New Brunswick</Company><LinksU pToDate>fa lse</Links UpToDate>< Characters WithSpaces >170</Char actersWith Spaces><Sh aredDoc>fa lse</Share dDoc><Hype rlinksChan ged>false< /Hyperlink sChanged>< AppVersion >12.0000</ AppVersion ></Propert ies></pkg: xmlData></ pkg:part>< /pkg:packa ge>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="applicati
That's it. When I paste that lot into a text file, save as XML then open in Visual Studio, I get this error:
File Load
Some bytes have been replaced with the Unicode substitution character while loading file C:\.....Test.XML with Unicode (UTF-8) encoding. Saving the file will not preserve the original file contents
This means you are writing unicode UTF8 characters in the XML file but not declaring it as a UTF8 encoded document, and perhaps not saving as one either.
File Load
Some bytes have been replaced with the Unicode substitution character while loading file C:\.....Test.XML with Unicode (UTF-8) encoding. Saving the file will not preserve the original file contents
This means you are writing unicode UTF8 characters in the XML file but not declaring it as a UTF8 encoded document, and perhaps not saving as one either.
Further to that, if I press Save in Visual Studio, the file then opens perfectly in Word, so it must be an other unicode character that's causing the problem, or is your ASP.NET page not a unicode page itself?
ASKER
Ok so when i actually call the function and write to the template I should specify a charset of utf-8?
ASKER
Here is an example of where the function is called for a click even to print the envelope
Protected Sub btnPrintAddy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrintAddy.Click
Dim ResponseFileText As String
' Populate mLicenceForm for passing to utility method
GetDataFromControls()
' Fetch envelope template from cache
ResponseFileText = Context.Cache.Get("envelop eTemplate" ).ToString
'Send Response
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader("conten t-disposit ion", "attachment;filename=envel ope.xml")
Response.Write(PclUtility. CreateEnve lopeForPri nt(mLicenc eForm, ResponseFileText))
Response.Flush()
Response.End()
End Sub
Should I have the response.charset set to utf-8?
Protected Sub btnPrintAddy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrintAddy.Click
Dim ResponseFileText As String
' Populate mLicenceForm for passing to utility method
GetDataFromControls()
' Fetch envelope template from cache
ResponseFileText = Context.Cache.Get("envelop
'Send Response
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader("conten
Response.Write(PclUtility.
Response.Flush()
Response.End()
End Sub
Should I have the response.charset set to utf-8?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I specified the charset to utf-8 and still no luck. The webform the function pulls its data from to build the strings is unicode, and .xml template i'm manipulating is automatically utf8 so I'm at a lost where it's going wrong
ASKER
I actually ended up just using cdata around the string when its being created and it worked like a charm
ASKER
Ended up going with CDATA which I found myself but the help I got was still great