scew-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [scew-users] scew_get_attribute


From: Aleix Conchillo Flaqué
Subject: Re: [scew-users] scew_get_attribute
Date: Mon, 26 Jul 2010 22:48:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100619 Iceowl/1.0b1 Icedove/3.0.5

On 07/26/2010 07:41 PM, Maule Mark wrote:
Hi all:

I'm new to scew and am trying to recompile some ancient code from our
tree. There are a handful of routines that are undefined after
compile/link against the 1.1.2 libscew.a:

scew_get_attribute tracedb.o
scew_get_attribute_name tracedb.o
scew_get_element_contents tracedb.o
scew_get_root tracedb.o
scew_get_element tracedb.o
scew_get_attribute_count tracedb.o
scew_get_attribute_value tracedb.o
scew_get_element_name tracedb.o
scew_load_file tracedb.o
scew_get_element_count tracedb.o

Are these routines maybe part of an old version of scew and are now
deprecated? Any help/advice is appreciated.


In SCEW 1.0.0, the API was stabilized and cleaned up for consistency. Most of the functions you mentioned have never existed, all of SCEW functions have a prefix corresponding to the desired type, for example:

scew_XXXX_function where XXXX can be: parser, tree, element, attribute...

From "scew_load_file" I guess you meant "scew_parser_load_file". As an example, below is the change you will have to make to load a file:

*********
Load file (SCEW < 1.0.0):

scew_parser *parser = scew_parser_create ();
scew_parser_load_file (parser, "file.xml");
scew_tree *tree = scew_parser_tree (parser);

*********
Load file (SCEW >= 1.0.0):

scew_parser *parser = scew_parser_create ();
scew_reader *reader = scew_reader_file_create ("file.xml");
scew_tree *tree = scew_parser_load (parser, reader);

*********

You can also check at the samples found in the "examples" directory.

If you have any doubt during the update, don't hesitate to post a message to the list. But it should be very straight forward checking at the documentation:

http://www.nongnu.org/scew/doc/api/modules.html

Best regards,

Aleix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]