AsXml.fun 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCreateMemoryReader (*creates an xml memory reader*)
  2. VAR_INPUT
  3. enable : BOOL; (*enables execution*)
  4. pXmlMemory : UDINT; (*pointer to the XML data*)
  5. memorySize : UDINT; (*size of the XML data*)
  6. END_VAR
  7. VAR_OUTPUT
  8. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  9. ident : UDINT; (*identifier*)
  10. END_VAR
  11. END_FUNCTION_BLOCK
  12. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCloseMemoryReader (*closes the xml memory reader*)
  13. VAR_INPUT
  14. enable : BOOL; (*enables execution*)
  15. ident : UDINT; (*identifier*)
  16. END_VAR
  17. VAR_OUTPUT
  18. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  19. END_VAR
  20. END_FUNCTION_BLOCK
  21. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlReadNextNode (*reads the next XML node*)
  22. VAR_INPUT
  23. enable : BOOL; (*enables execution*)
  24. ident : UDINT; (*identifier*)
  25. forceRead : BOOL; (*reads next Node even if last node could not be read successfully*)
  26. skipSubtree : BOOL; (*avoids XML nodes in the subtree*)
  27. pName : UDINT; (*pointer to buffer for the XML node name*)
  28. nameSize : UDINT; (*size of the buffer for the XML node name*)
  29. pValue : UDINT; (*pointer to buffer for the XML node value*)
  30. valueSize : UDINT; (*size of the buffer for the XML node value*)
  31. END_VAR
  32. VAR_OUTPUT
  33. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  34. nodeType : UDINT; (*type of the XML node*)
  35. depth : UDINT; (*depth of the XML node*)
  36. isEmpty : BOOL; (*empty XML node?*)
  37. attributeCount : UDINT; (*number of attributes*)
  38. neededNameSize : UDINT; (*needed name buffer size*)
  39. neededValueSize : UDINT; (*needed value buffer size*)
  40. END_VAR
  41. END_FUNCTION_BLOCK
  42. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlReadAttributeNr (*reads the next attribute of the XML node*)
  43. VAR_INPUT
  44. enable : BOOL; (*enables execution*)
  45. ident : UDINT; (*identifier*)
  46. index : UDINT; (*index of the attribute to read*)
  47. pName : UDINT; (*pointer to buffer for the attribute name*)
  48. nameSize : UDINT; (*size of the buffer for the XML attribute name*)
  49. pValue : UDINT; (*pointer to buffer for the attribute value*)
  50. valueSize : UDINT; (*size of the buffer for the XML attribute value*)
  51. END_VAR
  52. VAR_OUTPUT
  53. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  54. neededNameSize : UDINT; (*needed name buffer size*)
  55. neededValueSize : UDINT; (*needed value buffer size*)
  56. END_VAR
  57. END_FUNCTION_BLOCK
  58. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCreateMemoryWriter (*creates an xml memory writer*)
  59. VAR_INPUT
  60. enable : BOOL; (*enables execution*)
  61. END_VAR
  62. VAR_OUTPUT
  63. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  64. ident : UDINT; (*identifier*)
  65. END_VAR
  66. END_FUNCTION_BLOCK
  67. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlGetMemoryInfo (*gets the pointer to and the size of the created XML data*)
  68. VAR_INPUT
  69. enable : BOOL; (*enables execution*)
  70. ident : UDINT; (*identifier*)
  71. END_VAR
  72. VAR_OUTPUT
  73. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
  74. pXmlData : UDINT; (*pointer to the created XML data*)
  75. xmlDataSize : UDINT; (*size of the created XML data*)
  76. END_VAR
  77. END_FUNCTION_BLOCK
  78. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCloseMemoryWriter (*closes the xml memory writer and releases the allocated memory*)
  79. VAR_INPUT
  80. enable : BOOL; (*enables execution*)
  81. ident : UDINT; (*identifier*)
  82. END_VAR
  83. VAR_OUTPUT
  84. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  85. END_VAR
  86. END_FUNCTION_BLOCK
  87. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartDocument (*writes the version and the encoding of the document*)
  88. VAR_INPUT
  89. enable : BOOL; (*enables execution*)
  90. ident : UDINT; (*identifier*)
  91. pVersion : UDINT; (*pointer to the version*)
  92. pEncoding : UDINT; (*pointer to the encoding*)
  93. pStandalone : UDINT; (*pointer to the standalone text*)
  94. END_VAR
  95. VAR_OUTPUT
  96. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  97. END_VAR
  98. END_FUNCTION_BLOCK
  99. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartDocEnc (*writes the version and the encoding of the document and sets the input encoding*)
  100. VAR_INPUT
  101. enable : BOOL; (*enables execution*)
  102. ident : UDINT; (*identifier*)
  103. pVersion : UDINT; (*pointer to the version*)
  104. pInputEncoding : UDINT; (*pointer to the input encoding e.g. "ISO-8859-1"*)
  105. pOutputEncoding : UDINT; (*pointer to the output encoding e.g. "UTF-8"*)
  106. pStandalone : UDINT; (*pointer to the standalone text*)
  107. END_VAR
  108. VAR_OUTPUT
  109. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  110. END_VAR
  111. END_FUNCTION_BLOCK
  112. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteEndDocument (*finishes the document*)
  113. VAR_INPUT
  114. enable : BOOL; (*enables execution*)
  115. ident : UDINT; (*identifier*)
  116. END_VAR
  117. VAR_OUTPUT
  118. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  119. END_VAR
  120. END_FUNCTION_BLOCK
  121. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartElement (*starts a new XML element*)
  122. VAR_INPUT
  123. enable : BOOL; (*enables execution*)
  124. ident : UDINT; (*identifier*)
  125. pName : UDINT; (*pointer to the XML element name*)
  126. END_VAR
  127. VAR_OUTPUT
  128. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  129. END_VAR
  130. END_FUNCTION_BLOCK
  131. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteAttribute (*adds an attribute to the current XML element*)
  132. VAR_INPUT
  133. enable : BOOL; (*enables execution*)
  134. ident : UDINT; (*identifier*)
  135. pName : UDINT; (*pointer to the XML attribute name*)
  136. pValue : UDINT; (*pointer to the XML attribute value*)
  137. END_VAR
  138. VAR_OUTPUT
  139. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  140. END_VAR
  141. END_FUNCTION_BLOCK
  142. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteElementText (*writes an XML element text*)
  143. VAR_INPUT
  144. enable : BOOL; (*enables execution*)
  145. ident : UDINT; (*identifier*)
  146. pText : UDINT; (*pointer to the element text*)
  147. END_VAR
  148. VAR_OUTPUT
  149. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  150. END_VAR
  151. END_FUNCTION_BLOCK
  152. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteElementTextEx (*writes an XML element text*)
  153. VAR_INPUT
  154. enable : BOOL; (*enables execution*)
  155. ident : UDINT; (*identifier*)
  156. pText : UDINT; (*pointer to the element text*)
  157. textLen : UDINT; (*length of the element text*)
  158. END_VAR
  159. VAR_OUTPUT
  160. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  161. END_VAR
  162. END_FUNCTION_BLOCK
  163. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteEndElement (*closes the current XML element*)
  164. VAR_INPUT
  165. enable : BOOL; (*enables execution*)
  166. ident : UDINT; (*identifier*)
  167. END_VAR
  168. VAR_OUTPUT
  169. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  170. END_VAR
  171. END_FUNCTION_BLOCK
  172. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteComment (*writes an XML comment*)
  173. VAR_INPUT
  174. enable : BOOL; (*enables execution*)
  175. ident : UDINT; (*identifier*)
  176. pText : UDINT; (*pointer to the comment text*)
  177. END_VAR
  178. VAR_OUTPUT
  179. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  180. END_VAR
  181. END_FUNCTION_BLOCK
  182. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCommentEx (*writes an XML comment*)
  183. VAR_INPUT
  184. enable : BOOL; (*enables execution*)
  185. ident : UDINT; (*identifier*)
  186. pText : UDINT; (*pointer to the comment text*)
  187. textLen : UDINT; (*length of the comment text*)
  188. END_VAR
  189. VAR_OUTPUT
  190. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  191. END_VAR
  192. END_FUNCTION_BLOCK
  193. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCData (*writes an XML CDATA Section*)
  194. VAR_INPUT
  195. enable : BOOL; (*enables execution*)
  196. ident : UDINT; (*identifier*)
  197. pCData : UDINT; (*pointer to the CDATA data*)
  198. END_VAR
  199. VAR_OUTPUT
  200. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  201. END_VAR
  202. END_FUNCTION_BLOCK
  203. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCDataEx (*writes an XML CDATA Section*)
  204. VAR_INPUT
  205. enable : BOOL; (*enables execution*)
  206. ident : UDINT; (*identifier*)
  207. pCData : UDINT; (*pointer to the CDATA*)
  208. cdataLen : UDINT; (*length of the CDATA*)
  209. END_VAR
  210. VAR_OUTPUT
  211. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  212. END_VAR
  213. END_FUNCTION_BLOCK
  214. {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWritePI (*writes an XML process instruction*)
  215. VAR_INPUT
  216. enable : BOOL; (*enables execution*)
  217. ident : UDINT; (*identifier*)
  218. pTarget : UDINT; (*pointer to the process instruction*)
  219. pValue : UDINT; (*pointer to the pi value*)
  220. END_VAR
  221. VAR_OUTPUT
  222. status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
  223. END_VAR
  224. END_FUNCTION_BLOCK