This site Web
Home Page | The Sun API | Gallery | InfoSearch | News | Links | Contact Us

Sunlit Design > The Sun API > Documentation > XML-like Strings


Index


- Introduction
+ Using the Functions
+ User Guide
+ Function Reference
+ Constants

Contact Developer

Downloads

XML-like Strings

Many of The Sun API functions use XML strings for input parameters and return values.

Advantages

There are a number of advantages of using this XML text format for time and other values:

  • In most situations the use of this format is invisible to the user.
  • Time values are self describing, therefore functions that behave differently for different time values can be created.
  • The number of parameters to functions and the number of functions required is reduced.
  • Allows the timezone of the time value to be recorded as part of the time value.
  • The use of XML formats give lots of flexibility in designing very convenient functions in future versions of this program.

Which functions?

A function which uses XML strings has this fact shown in it's name.  

Functions that:

  • start with "sdx..." accept XML string values as input
  • end with "...x" return XML string values as output. 

See a XML Tag-Function Cross Reference

What is XML?

Extensible Markup Language, abbreviated XML, is a means of structuring data using HTML-like tags.  

For example:
    <MJD> 54675.34 </MJD> 
is a well formed XML entity which may be read as "The value of MJD is 54674.34."

The simplest general form of an XML entity is starttag data endtag

In the example above the 
    starttag is <MJD> 
    data
is 54675.34 and 
    endtag
is </MJD>

Notice that the endtag is formed by modifying the starttag with a "/".

In XML all endtag and starttags are case-sensitive.

XML entities supported by The Sun API (scroll down for rest)

Examples

Entity Example Meaning
ArcMin <ArcMin>34</ArcMin> 34 Arcminutes
ArcSec <ArcSec>45</ArcSec> 45 Arcseconds
CTD <CTD>.5</CTD> 12 noon
Day <Day>2</Day> 2nd day of a month
Degree <Degree>34</Degree> 34 Degrees
DMSSign <DMSSign>1</DMSSign> Positive sign of d:m:s value
Error <Error>-99999999</Error> Error!
Hour <Hour>13</Hour> 1pm
MJD <MJD>51544.0</MJD> 2000 Jan 1, at 00:00 UT
Month <Month>4</Month> April
SDY <SDY>30</SDY> January 30th at 00:00 UT
TimeZone <TimeZone>-6</TimeZone> -6 gives UT or 6 hours East of Greenwich
TMin <TMin>51</TMin> 51 Minutes of Time
TSec <TSec>42</TSec> 42 Seconds of Time
UTD <UTD>.75</UTD> 6pm UT
Year <Year>2001</Year> The Year 2001