Syntax Highlighting XMLs for Teradata

Over the past several months, I have been amending TDP’s Teradata syntax XML as there were some reserved words not included in the original file. Also, I have modified the ODBC XML to include Teradata’s key words as I still use the ODBC connection while upcoming features for the .Net connection are being developed.

I am attaching the files for those that work in Teradata and would like to replace their syntax XMLs as well. As I make improvements, I will update this post. The files go in the install directory under Templates\Languages (Windows).

Standard Disclaimer
While they are only syntax highlighting XMLs… It is highly recommended that you make a backup copy of your existing files if you decide to try them out. I take no responsibility for damage caused to your system(s) by replacing these files with my copies.

Language.SQL.Odbc.xml (24.6 KB)

Language.SQL.Teradata.xml (24 KB)

Teradata drivers support a text-based format for XML values. A client application or driver that uses the text format might require access to an XML parser to be able to parse the XML received on the wire.

The text format returns the XML serialization of the XML value. XML values retrieved in the text format are encoded in UTF-8. The following shows an example of document retrieval.

<?xml version="1.0" encoding="UTF-8"?>
<customer>
   <Name>John Hancock</Name>
   <Address>100 1st Street One City, CA 12345</Address>
   <Phone1>(999)9999-999</Phone1>
   <Phone2>(999)9999-998</Phone2>
   <Fax>(999)9999-997</Fax>
   <Email>John@somecompany.com</Email>
   <order Number="NW-01-16366" Date="Feb/28/2001">
      <Contact>Mary Shannon</Contact>
      <Phone>(987)6543-210</Phone>
      <ShipTo>Widgets Inc., 123 Regency Parkway, Portland, OR 43211</ShipTo>
      <SubTotal>2355.00</SubTotal>
      <Tax>141.50</Tax>
      <Total>2496.50</Total>
      <item ID="001">
         <Quantity>100</Quantity>
         <PartNumber>F54709</PartNumber>
         <Description/>
         <UnitPrice>23.55</UnitPrice>
         <Price>2355.00</Price>
      </item>
   </order>
</customer>

For the text format, the server will not try to pretty-print the XML value when serializing it for transfer to the client. If the client application needs to display the XML, it is up to the application to decide whether to do pretty-printing, provide syntax-highlighting, or other display options.

1 Like