[r150]: / trunk / Library / POUs / FB_XmlControl / svnobj  Maximize  Restore  History

Download this file

5 lines (5 with data), 6.4 kB

Gx_lÓ!0…jüoòÏj¶‘¹Ë×20System.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTextInterfaceL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}(*²Organizes parsing and composing of XML data. Data can be treated as STRING or Char Array.–Filebuffersize is default 4096 Byte and can be set via Gvl_Param_XmlControlUsage example:	VAR(		XML : XML_Control;l		Buffer: STRING(GVL_Param_XmlControl.udiMaxFileSize);		//or‚		Buffer: ARRAY [0..GVL_Param_XmlControl.udiMaxFileSize] OF CHAR;	END_VAR:	XML.pBuffer: = ADR (buffer);D	XML.LenBuffer: = SIZEOF (buffer);	 R- Add your own preffered fileheader like:!^XML: <?xml version=\"1.0\" encoding=\"UTF-8\"?>"	XML.writeDocumentHeader( '<?xml version=\"1.0\" encoding=\"UTF-8\"?>');#H- Composing a tag with a parameters:$<XML: <MyTag ParaName = "11" />%B	XML.newTag(sTagName: = 'MyTag');&f	XML.newPara(sName: = 'ParaName', sPara: = sValue);' 	XML.CloseTag();(- Tag value:):XML: <MyTag> MyText </ MyTag>*<	XML.newTag(sName := 'MyTag');+J	XML.newTagData(sTagData :='MyText');,N- Jump to the beginning of the XML data-(XML.toStartBuffer();."- Adds a comment:/.XML: <!-- MyComment -->0R	XML.newComment(sTagName: = 'MyComment');1t- returns the next Tag from the current position in buffer2XML.NextTag();3B- Output the parameter of the Tag4BXML.nextPara(sPara: = LastValue);5`Feedback: sPara returns the value found (string)6*)7:{attribute 'hide_all_locals'}8hFUNCTION_BLOCK FB_XmlControl IMPLEMENTS I_XmlControl9VAR:.	Buff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-,ÐÐ
­+ÚÐ--ÐÐ
­QÚÐ-ÐÐ
­MÚÐ-ÐÐ
­NÚÐ-.ÐÐ
­OÚÐ-/ÐÐ
­PÚÐ-ÐÐ
­LÚÐ-0ÐÐ
­,ÚÐ-ÐÐ
­-ÚÐ-ÐÐ
­.ÚÐ-1ÐÐ
­/ÚÐ-2ÐÐ
­0ÚÐ-ÐÐ
­1ÚÐ-ÐÐ
­2ÚÐ-3ÐÐ
­3ÚÐ-4ÐÐ
­4ÚÐ-5ÐÐ
­6ÚÐ-ÐÐ
­7ÚÐ-6ÐÐ
­8ÚÐ-7ÐÐ
­9ÚÐ-8ÐÐ
­:ÚÐ-9ÐÐ
­;ÚÐ-:ÐÐ
­<ÚÐ-;ÐÐ
­=ÚÐ-<ÐÐ
­>ÚÐ-=ÐÐ
­?ÚÐ->ÐÐ
­@ÚÐ-?ÐÐ
­AÚÐ-@ÐÐ
­BÚÐ-AÐÐ
­CÚÐ-BÐÐ
­DÚÐ-CÐÐ
­EÚÐ-DÐÐ
­FÚÐ-EÐÐ
­GÚÐ-FÐÐ
­HÚÐ-GÐÐ
­IÚÐ-HÐÐ
­JÚÐ-IÐÐ
­KÚÐ-JÐÐ
­ÚÐ-KÐL-MÐNO-PQRÐST­