On Wed, Jul 13, 2005 at 02:09:56PM +0200, Roberto Diaz wrote:
> Hi.
>
> I am trying to figure out how to iterate thorught an xmlChar *.
>
> I mean something like this:
>
> for (unsigned int i = 0; xmlUTF8Strlen (myString); ++i)
> /// obiously this wont work
> myString[i] = ...;
>
> How do I iterate the string?
depends what you want to do with it
while ( myString[i] != 0) {
i++;
}
or you can use xmlGetUTF8Char() to go though each character code point
using the returned len to increment the i byte index.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
[EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml