CompSci497
Advanced XML Programming with XmlPL
Lecture Notes
Friday, February 23rd, 2007
Contents
- Features of XmlPL
- Declarations
- package
- import
- functions
- variables
- Statements
- Loops: While, Foreach and For
- Switch and Case
- Throw, Try and Catch
- Append
- Redirect
- Types
- Expressions
- Discuss Projects
1) Features of XmlPL
1.1) Declarations
1.1.1) package
- id
- version
- library installation requirements
1.1.2) import
- library id
- version expression
- renaming
- using different versions of the same library
1.1.3) functions
- Arguments
- Pass by value, pass by reference
- constant
- Overloading
- Forward Declaration
1.1.4) variables
1.2) Statements
1.2.1) Loops: While, Foreach and For
- while and for as usual
- When foreach is more efficient
1.2.2) Switch and Case
- integer
- string: efficient binary search
1.2.3) Throw, Try and Catch
- the exception type
- catch context variable
1.2.4) Append
- output streams
- disabling append
- assignment & increment
1.2.5) Redirect
- output stream type
- opening output streams: openStringStream et.al.
- append statement redirection
1.3) Types
- Basic types: boolean, integer, real, string, exception, prefix,
qname
- void
- XML types: node, attribute, comment, document, element, pi,
text
- Generics: [], ++, <<
1.4) Expressions
- sequence expressions
- cast
- release
- null
2) Discuss Projects