This function was originally contributed by another visitor and I corrected the logic to return the max position of the character if occurrence is greater than the max.
I hope everyone finds it useful.
Methods for Parsing XML files
Jon shows you several ways you can parse XML.
2007-10-02 (first published: 2002-06-20)