From: Aleix Conchillo FlaquƩ <address@hidden>
To: address@hidden
Sent: Mon, July 26, 2010 3:48:20 PM
Subject: Re: [scew-users] scew_get_attribute
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.htmlBest regards,
Aleix
_______________________________________________
scew-users mailing list
address@hiddenhttp://lists.nongnu.org/mailman/listinfo/scew-users