guides:programming:programmers_reference_manual:get_xml_value

Get_XML_Value function

(Introduced in OpenInsight 4.1.3). Extracts tag values from records that have raw XML data stored in them.

Get_XML_Value(Target_Tag, XML_Rec)

The Get_XML_Value has the following parameters.

ParameterDescription
Target_Tag The tag within the XML record from which you wish to extract values.



Note: XML tags are case sensitive. However, the Target_Tag argument is not case sensitive. ITEM_DESCRIPTIONS_ENTERED and item_descriptions_entered will both match to the tag, if it exists in the XML file.
XML_RecA variable containing the contents of the XML file after it has been read into memory. See the example below.

Note: Multivalue fields are also delimited by value marks.

A value-mark delimited list of values for the records in Target_Tag.

/*

   After the Get_XML_Value() function is called, the variable

   item_descriptions will contain the values in the
item_descriptions_entered tag.

*/

 

declare function Get_XML_Value

filename = 'C:\orders.xml'

OSRead filerec from filename then

       item_descriptions = Get_XML_Value( 'item_descriptions_entered', filerec)

end
 
 
  • guides/programming/programmers_reference_manual/get_xml_value.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1