Export GRAMP xml database

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Export GRAMP xml database

Sjoerd van Staveren
I am developing a website based on the xml document that is created when
you use the export function 'GRAMPS xml database'

The file that is created by this export however is not proper xml. You
can't read the file with a text editor like gedit, when you try to open
it you get the message that the encoding is not UTF-8. Another problem
is that the second line of the file contains a page break that should
not be there.

You first need to open the file with an XML editor, in my case Screem,
remove the page break and save the file again as xml file. After you
have done that, the file size has grown by a factor 4 to 5 so it seems
that the original file is compressed. After these corrections it is
possible to use php functions as simpleXML or create a DOM document etc.

Does anybody know something more about this? What is reason the original
file is compressed? Why is not directly exported in UTF-8 encoding?

Greetings,

Sjoerd van Staveren
Swolgen
Netherlands


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Espen Berg-2
2009/1/24 Sjoerd van Staveren <[hidden email]>:

> I am developing a website based on the xml document that is created when
> you use the export function 'GRAMPS xml database'
>
> The file that is created by this export however is not proper xml. You
> can't read the file with a text editor like gedit, when you try to open
> it you get the message that the encoding is not UTF-8. Another problem
> is that the second line of the file contains a page break that should
> not be there.
>
> You first need to open the file with an XML editor, in my case Screem,
> remove the page break and save the file again as xml file. After you
> have done that, the file size has grown by a factor 4 to 5 so it seems
> that the original file is compressed. After these corrections it is
> possible to use php functions as simpleXML or create a DOM document etc.
>
> Does anybody know something more about this? What is reason the original
> file is compressed? Why is not directly exported in UTF-8 encoding?


Hi!
The file named *.gramps is compressed using gzip.  If you uncompress it
  mv <filename.gramps> <filename.gramps.gz> && gunzip <filename.gramps.gz>
...you will have a real XML-file which can be read by any text editor.

So the reason why the GRAMPS-XML file grows 4-5 times is because the
file you save from Screem is uncompressed.  Screem uncompress the file
when opening, but doesn't compress it again when saving.


Espen

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Duncan Lithgow-5
In reply to this post by Sjoerd van Staveren
2009/1/24 Sjoerd van Staveren <[hidden email]>:
> I am developing a website based on the xml document that is created when
> you use the export function 'GRAMPS xml database'

Please keep us informed about how this goes. A few users have played
with this and we really need to start making these options known to
other users. So I hope that whatever you're doing in GPL ;-)

Duncan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Sjoerd van Staveren
Hello Duncan,

No probleem, should I succeed I will make it available to everyone.
I will keep you informed.

Sjoerd

Op zaterdag 24-01-2009 om 23:59 uur [tijdzone +0100], schreef Duncan
Lithgow:

> 2009/1/24 Sjoerd van Staveren <[hidden email]>:
> > I am developing a website based on the xml document that is created when
> > you use the export function 'GRAMPS xml database'
>
> Please keep us informed about how this goes. A few users have played
> with this and we really need to start making these options known to
> other users. So I hope that whatever you're doing in GPL ;-)
>
> Duncan
>


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Benny Malengier
In reply to this post by Sjoerd van Staveren


2009/1/24 Sjoerd van Staveren <[hidden email]>
I am developing a website based on the xml document that is created when
you use the export function 'GRAMPS xml database'

The file that is created by this export however is not proper xml. You
can't read the file with a text editor like gedit, when you try to open
it you get the message that the encoding is not UTF-8. Another problem
is that the second line of the file contains a page break that should
not be there.

Your first problem is answered.
If the xml is not proper due to a page break, please, add a bug item in the bug tracker so this can be resolved.

Benny


You first need to open the file with an XML editor, in my case Screem,
remove the page break and save the file again as xml file. After you
have done that, the file size has grown by a factor 4 to 5 so it seems
that the original file is compressed. After these corrections it is
possible to use php functions as simpleXML or create a DOM document etc.

Does anybody know something more about this? What is reason the original
file is compressed? Why is not directly exported in UTF-8 encoding?

Greetings,

Sjoerd van Staveren
Swolgen
Netherlands


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Johan Vromans
Benny Malengier <[hidden email]> writes:

> If the xml is not proper due to a page break, please, add a bug item
> in the bug tracker so this can be resolved.

Don't worry, the XML is fine.

-- Johan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Sjoerd van Staveren
That is correct, the XML is OK once it is uncompressed. I made the
mistake to try to use the compressed file with pHp/simplXML.

So there is no bug and there is no problem, sorry for the fuzz.

Sjoerd van Staveren

Op maandag 26-01-2009 om 11:52 uur [tijdzone +0100], schreef Johan
Vromans:

> Benny Malengier <[hidden email]> writes:
>
> > If the xml is not proper due to a page break, please, add a bug item
> > in the bug tracker so this can be resolved.
>
> Don't worry, the XML is fine.
>
> -- Johan
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
>


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Sjoerd van Staveren
In reply to this post by Duncan Lithgow-5
There is a first attempt on:

www.gramps.van-staveren.net

What you see is an index on the first characters of the last names in the database. You also see the database statistics and a few events that happened "today" in the past.
Clicking on a character brings you to the last names, clicking on the last names brings you to the individuals and clicking on the individual brings you to the family sheet. from the family sheet you can navigate to other family sheets.

Please do not pay attention to the lay-out, I know it sucks. Everything is stil in Dutch but you will get the general idea.

Everything is based on the xml document created by GRAMPS and 12 php scripts, in total about 3 MB of which the xml document is the largest with 2.8MB.

Please send me your comments,

Sjoerd van Staveren

-----Oorspronkelijke bericht-----
Van: Duncan Lithgow <[hidden email]>
Aan: [hidden email]
Cc: gramps-users <[hidden email]>
Onderwerp: Re: [Gramps-users] Export GRAMP xml database
Datum: Sat, 24 Jan 2009 23:59:38 +0100

2009/1/24 Sjoerd van Staveren <[hidden email]>:
> I am developing a website based on the xml document that is created when
> you use the export function 'GRAMPS xml database'

Please keep us informed about how this goes. A few users have played
with this and we really need to start making these options known to
other users. So I hope that whatever you're doing in GPL ;-)

Duncan


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Johan Vromans
Sjoerd van Staveren <[hidden email]> writes:

> Please send me your comments,

I'm very impressed!

-- Johan

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Doug-11
Johan Vromans wrote:

> Sjoerd van Staveren <[hidden email]> writes:
>
>  
>> Please send me your comments,
>>    
>
> I'm very impressed!
>
> -- Johan
>  
Likewise!

Doug

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Sjoerd van Staveren
In reply to this post by Duncan Lithgow-5
Hello All,

There is a new and slightly improved version of, what I have called grampsXMLview on:

http://gramps.van-staveren.net

I have improved the lay-out a bit and made a few other changes. You can also download the files so you can use them  with your own data. At the moment everything is still in Dutch but the whole idea is very simple.

You have to download the zip file with the php scripts from the download section. You have to make a "data.gramps" file with the export wizzard from GRAMPS. Unpack this data.gramps file and rename it in data.xml. Upload the data.xml together with the files from the zip to a location on the web or place it on your local webserver and the whole thing should be up and running.

The webserver has to support PHP5 and al the XML functionality has to be enabled or active, otherwise it will not work.

I hope you like it and please send your ideas and comments to this forum.

Sjoerd van Staveren
Swolgen
Netherlands

-----Oorspronkelijke bericht-----
Van: Duncan Lithgow <[hidden email]>
Aan: [hidden email]
Cc: gramps-users <[hidden email]>
Onderwerp: Re: [Gramps-users] Export GRAMP xml database
Datum: Sat, 24 Jan 2009 23:59:38 +0100

2009/1/24 Sjoerd van Staveren <[hidden email]>:
> I am developing a website based on the xml document that is created when
> you use the export function 'GRAMPS xml database'

Please keep us informed about how this goes. A few users have played
with this and we really need to start making these options known to
other users. So I hope that whatever you're doing in GPL ;-)

Duncan


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Export GRAMP xml database

Laura Mellen-2
Very nice! I would love to one day have something like this online.
Thank you for sharing.
Laura

On Sun, Feb 8, 2009 at 4:26 AM, Sjoerd van Staveren <[hidden email]> wrote:
Hello All,

There is a new and slightly improved version of, what I have called grampsXMLview on:

http://gramps.van-staveren.net

I have improved the lay-out a bit and made a few other changes. You can also download the files so you can use them  with your own data. At the moment everything is still in Dutch but the whole idea is very simple.

You have to download the zip file with the php scripts from the download section. You have to make a "data.gramps" file with the export wizzard from GRAMPS. Unpack this data.gramps file and rename it in data.xml. Upload the data.xml together with the files from the zip to a location on the web or place it on your local webserver and the whole thing should be up and running.

The webserver has to support PHP5 and al the XML functionality has to be enabled or active, otherwise it will not work.

I hope you like it and please send your ideas and comments to this forum.

Sjoerd van Staveren
Swolgen
Netherlands

-----Oorspronkelijke bericht-----
Van: Duncan Lithgow <[hidden email]>
Aan: [hidden email]
Cc: gramps-users <[hidden email]>
Onderwerp: Re: [Gramps-users] Export GRAMP xml database
Datum: Sat, 24 Jan 2009 23:59:38 +0100

2009/1/24 Sjoerd van Staveren <[hidden email]>:
> I am developing a website based on the xml document that is created when
> you use the export function 'GRAMPS xml database'

Please keep us informed about how this goes. A few users have played
with this and we really need to start making these options known to
other users. So I hope that whatever you're doing in GPL ;-)

Duncan


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users