Data360 Analyze

Welcome to the Data360 Analyze community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only
  • 1.  Parsing XML Data

    Posted 12-01-2016 13:27

    Hi I'm trying to parse an XML File that matches the below sample format:

    NON -XML LINE
    \NEWLINE
    XML TAGS
    XML TAGS
    ...
    \NEWLINE
    NON-XML LINE

    The above format repeats 

    Sample BELOW:

    2016.11.30 07:57:57:447 EST | Audit | read79168853 | NONE | System | DeviceManagementFileAuthLocationGetRequest18

    <?xml version="1.0" encoding="UTF-8"?>
    <TAB1 protocol="OCI" xmlns="C">
    <sessionId xmlns="">0</sessionId>
    <command xsi:type="DeviceManagementFileAuthLocationGetRequest18" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <deviceAccessProtocol>Http</deviceAccessProtocol>
    <deviceAccessMethod>GET</deviceAccessMethod>
    <deviceAccessURI>/System.xml</deviceAccessURI>
    </command>
    </TAB1>

     

    Tried using XML Tabular Data input and got the following error:

    XML data error. There is a problem processing xml data.

    XML data error. There is a problem processing XML data line [1] column [1]. Content is not allowed in prolog.

    Error code:
    Raised on 2016-12-01 at 20:15:51

    Java details:
    com.lavastorm.brain.node.lal.tabularXml.AbstractTabularXmlFile$TabularXmlErrorHandler
    (AbstractTabularXmlFile.java@263)

     

    Any guidance re parsing this XML/Text File is Appreciated.



  • 2.  RE: Parsing XML Data

    Employee
    Posted 12-01-2016 13:39

    It may not be the "best" solution, but what I had to do for such a file was read it in with the Delmited_Input node, use a filter to remove those first 3 records, write it back out with the Delimited_Output node, then read the (temporary) file with TabularXML.   Not pretty, but got the job done.



  • 3.  RE: Parsing XML Data

    Posted 12-01-2016 13:42

    Hi Stony,

    Thanks. Crossed my mind - just wondered if there was a more elegant way of doing.

    Will try the above.

    Could you advise under what contact one might use Data Reader node?

     

    Thanks Again.



  • 4.  RE: Parsing XML Data

    Employee
    Posted 12-01-2016 13:54

    The DataReader is primarily for use with another Lavastorm product called the Lavastorm Data Reader (LDR) - it was designed mainly to handle high-volume CallDetailRecord files by a telephony operator.