XmlStream

Takes one parameter, Data

Description:

Data will be parsed as clean XML, with XML Attributes being parsed into the WorkQuery with Fields in the shape of Scope#AttributeName, and XML Elements being parsed into Fields in the shape of Scope.ElementName. Multiple instances of an XML Element will be expanded into multiple Records.

Example:

With an input file, called XmlStreamTest.xml, containing human parsable xml code that contains Tab and CrLf characters
<Wrapper>
   <OneRecordOfData>
      <Number>123456</Number>
      <Name>Bugs Bunny</Name>
      <Friend>Elmer Fudd</Friend>
   </OneRecordOfData>
   <OneRecordOfData>
      <Number>654321</Number>
      <Name>Pinky</Name>
      <Friend>The Brain</Friend>
   </OneRecordOfData>
</Wrapper>

 
Allow the parser to work at speed by cleaning up the human part then clean up the post XmlStream field names to leave a nominal query
Rem 'XmlStream Example
    [New] XmlIn     =   LoadFile$ "XmlStreamTest.xml"
    XmlIn           =   Replace$ ($CrLf), ""
    XmlIn           =   Replace$ ($Tab), ""
    XmlStream           XmlIn
    LTrimFields         "Wrapper."
    LTrimFields         "OneRecordOfData."
    HtmlTable
EndRem

Number | Name | Friend

123456 | Bugs Bunny | Elmer Fudd

654321 | Pinky | The Brain