Hot Topic (More than 10 Replies) [Fixed Cannot import XML forms (Read 2501 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
[Fixed Cannot import XML forms
Sep 16th, 2007 at 5:18am
Print Post Print Post  
Fixed in 2.0.3

Version 2.0.2  Unable to import XML form files.  Expected to import and relink.

Exported two forms from Application A as XML files.  Files are in destination, look good in text editor.
Both XML files are relatively small, 35Kb and 287Kb each.

Opened Application B.  Opened existing database, named different from A.
Selected to import XML form.  Get error:
"Error: Cannot translate XML form file Data\SS\Masters\frmTest1.xml.
Check the Server Administration Log for details."

Try importing form 2 instead, same results.

SvrAdmin log shows one line for each error:
server_error     S_CLIENT 510071   Error: Cannot translate XML form file Data\SS\Masters\frmTest1.xml.

Tried creating a new database in App B with same name as original in App A. No Elements.  Still could not import.  Added element to new form in database, tried to import again, same result.

See nothing special about instructions in User Guide.  What am I missing here?
« Last Edit: Oct 4th, 2007 at 9:18pm by Hammer »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Cannot import XML forms
Reply #1 - Sep 16th, 2007 at 1:40pm
Print Post Print Post  
I have confirmed that I too get an error when trying to import an XML form.

The problem must be in the creation of the XML file, because I happened to have an XML file that I created back on July 12th, 2007, and that imports without error.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #2 - Sep 16th, 2007 at 6:36pm
Print Post Print Post  
Hmmm, happy and sad to hear that Carl. 
Happy because of confirmation, sad because of confirmation.

I also had success in the past with imorting XML, but thought perhaps certain elements might have an impact.  It now sounds like this might be a version problem.  I don't think I can load old versions because the beta versions needed connection to Lantica Server and that is no longer available.

Can you send me a copy of the XML that you can import?  I would like to see if that works for me.
Thanks.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #3 - Sep 16th, 2007 at 7:49pm
Print Post Print Post  
While researching why XML files would not process properly, I found instructions that said
Quote:
To check if the XML is well-formed, you can open the document in Microsoft Internet Explorer 5 or later. If the document opens without an error, it is well-formed.


Opening my files in MSIE and Firefox, I got the following messages:
Quote:
XML Parsing Error: not well-formed
Location: file:///C:/Sesame2/Data/SS/Masters/frmTest1.xml
Line Number 697, Column 14:
While(vLoop <= vListCount) {
-----------------^


And I got this error with my other XML file:
Quote:
XML Parsing Error: not well-formed
Location: file:///C:/Sesame2/Data/SS/Masters/frmTest2.xml
Line Number 8654, Column 26:                  
........................<name>Client Address & Telephone List</name>
----------------------------------------------^


I also used this site: http://www.validome.org/xml/validate/ to validate the XML file and got the same error indications.  So it appears that there may be a problem with the XML code that is created?  Is there a Sesame XML parser that we can use to validate our files?

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Cannot import XML forms
Reply #4 - Sep 17th, 2007 at 5:22am
Print Post Print Post  
I've discovered that in my case, after deleting a Mass Update spec, the form exports/imports properly.

The Mass Update contained code with the following line in it, which is similar to one of your errors, and it's also where Internet Explorer indicated that there was an error in the XML file.
Code
Select All
while vLoop <= vCnt 


  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Cannot import XML forms
Reply #5 - Sep 17th, 2007 at 5:49am
Print Post Print Post  
Bob,

It does appear to be an issue with the way Sesame is exporting certain characters from Mass Update specs. I noticed that "<=" is being changed to "&lt;=" in the XML file when it comes from regular programming events, but not being changed at all when it comes from a Mass Update spec event.

Try removing all of your Mass Update specs (on a backup, of course), and see if you can export/import an XML form.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #6 - Sep 17th, 2007 at 5:59am
Print Post Print Post  
I edited the XML file.

Changed from "<=" to "=<".  Result = No Good (NG)
Changed from "<=" tp "<".  Result = NG
Changed from "<=" tp "=".  Result = NG

Then did a search to find I have many "<=" instances.  My tests above only changed the first one I saw in the error messages.  So, I went back to the first instance and found this:
Changed from "<=" to ">=".  Result = OK
Changed from "<=" tp "=".  Result = NG, but it was NG at the next instance of "<=", not at the same line.
So it appears that the "<" character may be the issue.

For this diagnosis only, I changed all "<=" to ">=" and had no more failures for that reason.
But, have a new failure now:
Quote:
</head>
--^


No more testing for me, will have to leave this to Lantica, I guess.
I think the Sesame XML parser needs to be updated to accept "<=" combinations.

Hmmm, gotta remember to change back my ">=" to "<=".
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Cannot import XML forms
Reply #7 - Sep 17th, 2007 at 11:13am
Print Post Print Post  
Thanks guys. We'll take a look at the Mass Update Specs and let you know what we see.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #8 - Sep 17th, 2007 at 2:13pm
Print Post Print Post  
I think it is in the general programming sections, dealing with "<=". 
My XMLs do not have a Mass Update spec, but both of mine, plus Carl's include "<="

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Cannot import XML forms
Reply #9 - Sep 17th, 2007 at 2:53pm
Print Post Print Post  
Bob_Hansen wrote on Sep 17th, 2007 at 2:13pm:
I think it is in the general programming sections, dealing with "<=". 
My XMLs do not have a Mass Update spec, but both of mine, plus Carl's include "<="



< and > are both used by XML, so you are likely correct.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #10 - Sep 20th, 2007 at 4:11am
Print Post Print Post  
Any idea on a date for a sensible solution? 

Lost of work waiting to be copied vs. a lot of duplicate layout/tabs work, copy/paste programming, etc.
Work estimate was based on XML transfers, not all the manual efforts.  Difficult to hold off much longer.


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Cannot import XML forms
Reply #11 - Sep 20th, 2007 at 5:09am
Print Post Print Post  
Bob, maybe you could either temporarily changed the "<" and ">" to something else like "LessThan" and "GreaterThan" until the XML export/import is completed; or just export the entire programming for the form, delete all programming, export form to XML, import XML form to new location, and import programming back into the form after it's in its new location.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #12 - Sep 20th, 2007 at 5:30pm
Print Post Print Post  
Been there, done that.

Could not replace "<" since it is a critical part of XML, so ...
I replaced "<=" with "~"



I was not getting error with ">" but decided to change that also, just in case.  So...
I replaced ">=" with "^".

Yes, before I made those changes I made sure there was no "`/^" symbols.

Tried to import, get same error message from Sesame.
If I open the file in browser, I get a message about </head> being an issue.

I just don't have the time to diagnose this any more, and I can't spend the time to make the changes manually as you suggested.  I had already done a similar process for one form, but I have too many to do. 

So, problem with XML import is not limited to "<", but it does need a solution soon.

(More personal details sent to Carl in PM).
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Cannot import XML forms
Reply #13 - Sep 20th, 2007 at 5:42pm
Print Post Print Post  
Quote:
or just export the entire programming for the form, delete all programming, export form to XML, import XML form to new location, and import programming back into the form after it's in its new location.

Since the problem characters seem to be contained in your code, have you tried Carl's other suggestion?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #14 - Sep 20th, 2007 at 5:52pm
Print Post Print Post  
Need to use available time to get my other work done first. 

It sounded like problem was confirmed by Lantica, and I was waiting for the solution. 
I did not think I needed to do more diagnosis, but Lantica would be doing that.
I heard nothing yet, so that is why I bumped the issue.

I can continue to try work arounds in spare time, but none available right now. 
Can probably get to it this weekend if no resolution by then.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Cannot import XML forms
Reply #15 - Sep 20th, 2007 at 5:55pm
Print Post Print Post  
We will indeed do diagnosis, but regardless of what we find, we are not releasing a solution within the next day or so. As it sounds like you need an immediate workaround, Carl's suggestion sounds likely.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #16 - Sep 20th, 2007 at 7:16pm
Print Post Print Post  
OK Erika, thanks for the minimum time frame.  I will have to plan and adjust accordingly.  I was hoping a solution would be really quick. 

PS, I would be willing to take an unofficial patch before a formal release was ready.   We could call it a beta test.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot import XML forms
Reply #17 - Sep 24th, 2007 at 11:06pm
Print Post Print Post  
Hammer wrote on Sep 20th, 2007 at 5:42pm:
Quote:
or just export the entire programming for the form, delete all programming, export form to XML, import XML form to new location, and import programming back into the form after it's in its new location.

Since the problem characters seem to be contained in your code, have you tried Carl's other suggestion?

That still fails.  I looked inside the XML export for the form, and it includes functions code that was deleted from  the GLOBAL code.  GLOBAL secrion is definitely blank.  Must be getting from another form?

In any case, I used a text editor and removed the programming section from the XML file.  It was between tags for <specs> and </specs>.  At that point, I did import again, and the file was accepted.  I then opened up the form Program Editor and imported the code that had been exported earlier. 

So, I am able to use brute force to import XML form, but still see a major bug in the Export XML area.
I am not sure I am causing other problems by manually editing the XML file.  Taking some risks here.  Problem is these files are not for me, so I don't end up with the inherent possible problems.

So steps are:
1.  Copy the form to be exported to XML
2.  Export the programming
3.  Delete all programming.  Many sections to be done, may be import a blank file will be quicker ?)
4.  Save Programming Design
5.  Export form to XML
6.  Open XML file with text editor.
7.  Locate unwanted programming between <specs> .... </specs> and delete all in between, including those tags.
8.  Save the modified XML file.
9.  Open destination application.
10.  Use Database Manager, open the destination database.
11.  Import modified XML file.
12.  Open form design, open Program Editor, import the program file that was exported earlier.
13.  Close editor and Save Layout Design.
14.  Relink Form as needed,
15.  Save Layout Design.
16.  Test and troubleshoot as needed.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Cannot import XML forms
Reply #18 - Sep 24th, 2007 at 11:43pm
Print Post Print Post  
Bob_Hansen wrote on Sep 24th, 2007 at 11:06pm:
3.  Delete all programming.  Many sections to be done, may be import a blank file will be quicker ?)

FWIW: Version 2 has a Delete All Programming choice that should ditch all the programming in a layout in one step.

Also, I have to check this, but I believe that code between the spec tags may be a saved mass update attached to the form. I'll have to look at source to confirm that though. There may be more than one instance of those tags.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: [BRF] Cannot import XML forms
Reply #19 - Sep 25th, 2007 at 3:03am
Print Post Print Post  
Thanks for pointing out "Delete All Programming".  Don't think I recall seeing that before.  So much new stuff!  That is great for this problem.

Erika, twp of these that are failing are really BASIC menu forms.  One has four buttons, no Mass Updates, no bound elements, buttons make calls to SelectTreeItems or ExitSesame.  Another form is simpler, only has one button that calls the four-button form.  I do have other more complex forms with multi tabs, subforms, 20+ buttons.  But don't even want to start until I can get these resolved.

I did do the two noted above manually, minor things to go through.  Still avoiding the larger one since even when "programming was removed", programming was still included in the XML file.  All of these are coming from the same application. 
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: [BRF] Cannot import XML forms
Reply #20 - Sep 25th, 2007 at 1:41pm
Print Post Print Post  
Bob_Hansen wrote on Sep 25th, 2007 at 3:03am:
One has four buttons, no Mass Updates, no bound elements, buttons make calls to SelectTreeItems or ExitSesame.  Another form is simpler, only has one button that calls the four-button form.  I do have other more complex forms with multi tabs, subforms, 20+ buttons.  But don't even want to start until I can get these resolved.


Hello Bob

If you still have an original copy of one of the XMl files could you look inside the <spec> braces for where you saw that code and above the code you will see an entry that says <type>. I need to know what it says in that entry.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: [BRF] Cannot import XML forms
Reply #21 - Sep 25th, 2007 at 2:27pm
Print Post Print Post  
Here is a section where I removed code.  Has extra lines that are part of the code that should not be here:
Quote:
           </event>
     </element>
     <specs>
           <spec>
                 <name>Data Dictionary</name>
                 <type>5</type>
                 <field_specs>
                       <field_name>Temp</field_name>
                       <value>/*
Does not fill in name of Database - Fixed here
Does not handle new Read Only conditions - Fixed here
Need Positions and sizes in reversed order to match Element Editor - Fixed here.
Uses MSIE vs. default browser. - Fixed here.
Should include @Platform for Sesame Version.- Fixed here

Looks like Type = 5.

And I also recognize this code as coming from a Mass Update Spec in the application.  That is the code for Data Dictionary.  Those first lines are comments as I was modifying the Data Dictionary code.

Don't know why it is coming in the FORM export, would expect it with the Application export, but not the form.  This looks like the specific problem, getting Mass Update Code, not necessarily the "<=" values, they just happen to be in the code.  Carl had mentioned his problem code was also associated with Mass Update.  I feel good that a solution is close at hand.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: [BRF] Cannot import XML forms
Reply #22 - Sep 25th, 2007 at 2:49pm
Print Post Print Post  
Bob_Hansen wrote on Sep 25th, 2007 at 2:27pm:
Don't know why it is coming in the FORM export, would expect it with the Application export, but not the form.  This looks like the specific problem, getting Mass Update Code, not necessarily the "<=" values, they just happen to be in the code.  Carl had mentioned his problem code was also associated with Mass Update.  I feel good that a solution is close at hand.


Type 5 is a Mass Update spec. For future reference, The actual Form events that are programmed in Sdesigner show up inside the <Event> </Event> tags.

All specs are attached to the form from which they were created so the get exported with that form as they are one of it's objects. The problem is that the Mass Update code is not being parsed the same as the regular programming is being parsed, Not that the Specs are included as part of the form when exported.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: [BRF] Cannot import XML forms
Reply #23 - Sep 25th, 2007 at 3:13pm
Print Post Print Post  
AHA!
Now I see that the MassUpdate Spec is associated with the simple Menu Form. I just went into the preview mode, opened the menu tree that is normally closed for the menu form, and looked at the Spec Manager.  Even though there are no records, there was a Mass Update spec for the Data Dictionary.

Apparently I had inserted it there at one time, months ago, and then copied it to a form with bound elements, visible Menu Tree for Mass Updates, etc.  Never removed it from original menu form.  So I knew the Mass Update was associated with another form, (one of the complex forms that I cannot import), but thought this menu form was only buttons.

So now I see, that any Saved Specs associated with the form comes over with the XML.  Now that I said that, it is so obvious.  I was thnking that the layouts and programming was exported to XML, I never though of the Spec Manger codes.  That is great, that is how it should be, everything gets exported.

Now you only need to fix the parsing of the MassUpdate programming and we are good to go!

PS, you mentions Type 5 = Mass Update.  Is there a reference of the Type value meanings available somewhere? 
.........  AHhhh, so ,  <specs> ..... </specs> are the elements associated with Spec Manager! 
This is scary, I am beginning to understand the content of the Sesame XML files.


Thanks for help and explanation.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged