Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

load XML-Structure out of a field in the database with "load ...resident"

Hello everybody,

I need to load XML-Structure out of a field in the database. I am pretty sure that I am not the first one who tries something like this.
I've searched a lot (forum/help/internet) but could not find any useful hint. So I really would appreciate if somebody could give me some help.

DB1.Table1

LogID

Date

ChangeXML

123456

30.09.2008 15:49:47

<ArrayOfLog><LogEntry><F>Property1</F><O>False</O></LogEntry><LogEntry><F>Property2</F><O>False</O></LogEntry><LogEntry><F>Property3</F><O>False</O></LogEntry><LogEntry></ArrayOfLog>

123457

30.09.2008 16:49:47

<ArrayOfLog><LogEntry><F>Property1</F><O>False</O></LogEntry><LogEntry><F>Property6</F><N>37.7500</N></LogEntry><LogEntry><F>Property7</F><O>75.0000</O><N>85.00</N></LogEntry></ArrayOfLog>

I load this table by the following Script and it works fine.

LOAD LogID,

DATE,

ChangeXML

;

SQL SELECT db1.table1.LogID, db1.table1.DATE, db1.table1.ChangeXML

FROM db1.table1

;

As you see in the column ChangeXML the Information is stored in XML-format. Now I want to load this XML with "Load ... resident... " .

If I copy the XML into a File (XML1.txt) and load it with the following Script and it works fine.

// Start of [XML1.txt] LOAD statements

LogEntry:

LOAD F,

O,

N

FROM (XmlSimple, Table is [ArrayOfLog/LogEntry]);

// End of [XML1.txt] LOAD statements

My problem now is how to combine the "Load ... resident ..." and the "load xml" to something like following

LOAD ChangeXML,

F,

O,

N

resident Table1 (XmlSimple, Table is [ArrayOfLog/LogEntry]);

Because it is no option to export all ChangeXML fields first into a file, to reload them afterwards again.

Somebody an idea?

1 Reply
Not applicable
Author

Anybody an idea?!