XML
HareScript's XML libraries aim for conformance with DOM Level 1 and DOM Level 2 with the following limitations:
- Entity expansion and external DTDs are not supported. There are significant security risks associated with these options.
XML DOM and parsing
- OBJECTTYPE HTMLDocument
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268
- OBJECT FUNCTION MakeXMLDocument(BLOB xmlfile, STRING encoding, BOOLEAN readonly)
Creates an XML Document object out of the specified blob
- OBJECT FUNCTION MakeXMLDocumentFromHTML(BLOB xmlfile, STRING encoding, BOOLEAN readonly, BOOLEAN noimplied)
Creates an XML Document out of a HTML document blob
- OBJECTTYPE SchematronSchema
A Schematron Schema document as returned by XMLDomImplementation::MakeSchematronSchema
- OBJECTTYPE XmlAttr
- OBJECTTYPE XmlCDATASection
- OBJECTTYPE XmlCharacterData
CharacterData - a base interface for UTF16 character data
- OBJECTTYPE XmlComment
- OBJECTTYPE XmlDocument
- OBJECTTYPE XmlDocumentFragment
- OBJECTTYPE XmlDocumentType
- OBJECTTYPE XmlDOMException
- OBJECTTYPE XmlDOMImplementation
DOMIplementation - XML APIs
- OBJECTTYPE XmlElement
XmlElement - an element in a XML document, eg
<body
> - OBJECTTYPE XmlNamedNodeMap
A collection of nodes that can be addressed by their name
- OBJECTTYPE XmlNode
- OBJECTTYPE XmlNodeList
- OBJECTTYPE XmlProcessingInstruction
- OBJECTTYPE XmlSchema
A XML Schema document as returned by XMLDomImplementation::MakeXMLSchema
- OBJECTTYPE XmlText
XML Schema (XSD) parsing and validation
- OBJECT FUNCTION CreateXSD2001Parser(OBJECT xmldomimpl)
Creates a parser which is built using the http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/ XML schema specification. Warning: This implementation isn't complete, by far!
- OBJECT FUNCTION MakeXMLSchema(BLOB xmlfile, STRING encoding, BOOLEAN readonly)
Creates an XML Schema out of the specified blob
- BOOLEAN FUNCTION ParseXSBoolean(STRING val)
Parse a xs:boolean
- MACRO ParseXSDSchema(OBJECT xsdparser, OBJECT node, STRING xsd_filename)
- INTEGER FUNCTION ParseXSInt(STRING val)
Parse a 32-bit xs:integer
- INTEGER64 FUNCTION ParseXSInt64(STRING val)
Parse a 64-bit xs:integer
- STRING ARRAY FUNCTION ParseXSList(STRING val)
Parse a xs:list (string array)
- RECORD ARRAY FUNCTION SimplifyXMLValidationErrors(RECORD ARRAY errorlist, OBJECT node)
Simplify a validation error list
- CONSTANT INTEGER unbounded_max_int
Value that is used to indicate an unbounded nr of elements (value 'unbounded' in minOccurs/maxOccurs)
XML Signature processing
- STRING FUNCTION CreateXMLSignature(STRING signaturealgorithm, STRING data, STRING privatekey, STRING passphrase)
Calculate an XML Signature signature
- STRING FUNCTION GetDigestAlgorithmFromSignatureAlgorithm(STRING signaturealgorithm)
Returns the digest algorithm used in a signature algorithm
- OBJECT FUNCTION GetXMLSignatureContextByNodes(OBJECT ARRAY nodes, OBJECT signaturesearchroot)
Return a new SignatureContext. The document should contain a <Signature> element that references all the signed nodes.
- STRING FUNCTION GetXMLSignatureDigest(STRING digestalgorithm, STRING todigest)
Get the (base64-encoded) digest of a string
- RECORD ARRAY FUNCTION ListXMLSignatureAlgorithms()
Returns a list of supported algorithms
- OBJECTTYPE SignatureContext
Object containing functions to sign and validate XML documents with the XML Signature standard
- BOOLEAN FUNCTION VerifyXMLSignature(STRING signaturealgorithm, STRING data, STRING signature_base64, STRING publickey)
Validate a XML Signature signature hash