![]() |
Home | Documentation |
Miscellaneous functions
updated Sat Sep 23 2023 by Robert van Engelen
|
This module defines other useful functions. More...
Functions | |
| void | soap_begin (struct soap *soap) |
| Reset context. More... | |
| const char * | soap_rand_uuid (struct soap *soap, const char *prefix) |
| Returns a randomized unique UUID string. More... | |
| int | soap_tag_cmp (const char *string, const char *pattern) |
| Compare string to a pattern. More... | |
| int | soap_match_tag (struct soap *soap, const char *tag1, const char *tag2) |
| Match an XML tag name. More... | |
This module defines other useful functions.
| void soap_begin | ( | struct soap * | soap | ) |
Reset context.
This function resets the context to start serialization with the serialize functions. Alternatively, soap_begin_send can be used before calling the serialize functions, but this is sometimes not possible so this function can be used instead.
soap_begin_send. | soap | soap context |
| int soap_match_tag | ( | struct soap * | soap, |
| const char * | tag1, | ||
| const char * | tag2 | ||
| ) |
Match an XML tag name.
This function returns SOAP_OK when the two specified XML tag names match. The first tag name is a qualified or unqualified parsed tag name when the parser is pulling XML tags. The second tag name is an unqualified or namespace-normalized qualified tag name or pattern to match. A namespace-normalized qualified tag name uses a prefix defined in the namespaces table. A pattern consists of two types of wildcard meta-characters: * matches any text of any length and - matches any single character. Returns SOAP_OK when the tags are matching or SOAP_TAG_MISMATCH when the tags are non-matching.
soap::fignore callback.SOAP_OK (match) or SOAP_TAG_MISMATCH (no match) | soap | soap context |
| tag1 | parsed (un)qualified tag name string to match |
| tag2 | (namespace-normalized qualified) tag name string or pattern to match |
| const char* soap_rand_uuid | ( | struct soap * | soap, |
| const char * | prefix | ||
| ) |
Returns a randomized unique UUID string.
This function returns a randomized unique UUID string stored in a temporary buffer. The UUID string starts with the specified prefix if non-NULL.
| soap | soap context |
| prefix | prefix string or NULL |
| int soap_tag_cmp | ( | const char * | string, |
| const char * | pattern | ||
| ) |
Compare string to a pattern.
This function returns zero when the specified string matches the given pattern, nonzero otherwise. A pattern consists of two types of wildcard meta-characters: * matches any text of any length and - matches any single character. This function is commonly used to match XML tags and XML namespace URIs, such as the URI pattern in the third column of the namespaces table.
| string | string to match |
| pattern | pattern to match |