Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   XML import Error, posted by Donald on Thu Feb 27 15:15:55 2014 new__2.xml
    icon2.gif   Re: XML import Error, posted by Andreas Luedeke on Mon Mar 3 15:42:29 2014 
       icon2.gif   Re: XML import Error, posted by Donald on Tue Mar 4 19:48:02 2014 new__2.xml
          icon2.gif   Re: XML import Error, posted by Donald on Tue Mar 11 15:17:36 2014 
Message ID: 67671     Entry time: Tue Mar 4 19:48:02 2014     In reply to: 67670     Reply to this: 67677
Icon: Reply  Author: Donald  Author Email: don.drummel@gmail.com 
Category: Question  OS: Windows  ELOG Version: 2.9.2-2475 
Subject: Re: XML import Error 

Andreas Luedeke wrote:

Donald wrote:

Hi

 

I've written a powershell script parse a html table that contains old log book data that i would like to import to a elog book.  I've attached a example of the output.

When i attempt a import i get this error

"XML file does not contain <ENCODING> element"

The file does contain an encoding for utf-8  I've tried converting the xml to ANSI and ISO-8859-1 encodings but i get the same error.

is there something obvious that I'm missing?

here is the config of the log book:

 

[WLTST]
Theme = default
Comment = Test Logbook
Attributes = Author, Object, Action
Comment Author = Username
Comment Action = What
Comment Text = Why
Required Attributes = Author, Object, Action, Text
Page Title = Test Logbook
Reverse sort = 1
Quick filter = Date, Type

Hi Donald,
yes, the import function gave me some headache in the past, too.
 
English (auto-detected) » English
 
Here it appears that <ENCODING> </ENCODING> became somehow mandatory. But it has a different meaning then what you expect: it is the type of code in the text field, one out of HTML, ELCode or plain.
(Stefan: is this needed to be mandatory? Couldn't you just have some default ?)
In your case: you can just add the XML code "<ENCODING> </ENCODING>" before the <TEXT> token.
My problems were always related to the date format: elogd is very restrictive about what date format it is accepting. that will be your next pproblem ;-)

I hope this helps.

 Hi Andreas

That worked,  thank you so much. now I'm on to a new error. 

Now every time i try to do the import it crashed the elogd. 

OS is windows server 2008 R2.  I have the elogd installed as a service.

here is the even log:

Faulting application name: elogd.exe, version: 0.0.0.0, time stamp: 0x51248707
Faulting module name: elogd.exe, version: 0.0.0.0, time stamp: 0x51248707
Exception code: 0xc0000417
Fault offset: 0x000682da
Faulting process id: 0x558
Faulting application start time: 0x01cf37d8870fc9a1
Faulting application path: D:\Program Files (x86)\ELOG\elogd.exe
Faulting module path: D:\Program Files (x86)\ELOG\elogd.exe
Report Id: defc3f39-a3cb-11e3-9dd5-005056954c86

I have attached the Data file I'm using to generate the fault every time.  same config as before.   Any Ideas?

 

Attachment 1: new__2.xml  712 Bytes  | Hide | Hide all
<?xml version="1.0" encoding="UTF-8"?>
<ELOG_LIST>
<ENTRY>
<MID>
2
</MID>
<DATE>
2014-02-24 22:28 
</DATE>
<OBJECT>
Archived Client:
</OBJECT>
<ACTION>
Archived Client:
Archived Client  to Manual_Archive and took a full backup of it 
</ACTION>
<ENCODING>plain</ENCODING>
<TEXT>
ticket: 123456 

Decommission of client. 
</TEXT>
<AUTHOR>
bob 
</AUTHOR>
</ENTRY>
<ENTRY>
<MID>
3
</MID>
<DATE>
2014-02-20 20:15 
</DATE>
<OBJECT>
Added client:
</OBJECT>
<ACTION>
Added client:
Added client  to VMware policy 
</ACTION>
<ENCODING>plain</ENCODING>
<TEXT>
Ticket 1919191 

New DHCP server needed to be backed up. 
</TEXT>
<AUTHOR>
bob 
</AUTHOR>
</ENTRY>
</ELOG_LIST>
ELOG V3.1.5-fe60aaf