[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Design question: GtkTextView/Buffer
- From: Darryl Ross <djr dazco com au>
- To: Dudley Irish <dirish arsmagna com>, gtk-app-devel-list gnome org
- Subject: Re: Design question: GtkTextView/Buffer
- Date: Wed, 16 Apr 2003 18:02:54 +1000
Dudley Irish wrote:
>I am experimenting with various ways to edit XML files. I have tried
>various diagram oriented approaches (trees and various graphs) and am
>now trying a text oriented approach. In order to do this, I need to
>be able to convert the XML into a text representation then back into
>XML. So far I have tried two approaches: using tags and using
>pixbufs.
>
I'm working on a similar project. I've used pixbufs for the tags.
Unfortunately work has gotten in the way of my project and it has been
put on hold for a while :(
>Given a textual representation of a structure how can I map pieces of
>the text back to the internal representation?
>
>Here is an example: Given this XML:
>
> <frame id=1234>
> A fair bit of cdata text.
> </frame>
>
>I want a textual representation that looks like:
>
> FRAME:
>
> A fair bit of cdata text.
>
I've made a bit of progress into this. I'm using libxml I have writen a
custom GtkTreeStore that uses a libxml dom tree as it's underlying
datasource. I then use hash tables to map GtkTextMarks to nodes in the
tree. This way I am able to find nodes in the TextBuffer. I can send you
the code I have so far if you are interested, or I can put it up
somewhere on the web.
Darryl
--
Darryl Ross
Principal Consultant, Dazco Technology ABN: 58 829 870 455
+61 3 9734 2466 http://www.dazco.com.au
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]