HOUSTON -

A homeless man was ticketed by police for digging through a garbage can.

James Kelly, who is a veteran, told Local 2 he was searching for donuts in Hermann Park when a Houston police officer issued a misdemeanor ticket. He was cited with "disturbing the contents of a garbage can in the downtown central business district."

"Anyone that desires to see someone else go hungry has no heart," said Kelly.

Some groups that provide services for people living on the streets of Houston are criticizing the police department for issuing the citation.

His attorney said many homeless people, like Kelly, often look through garbage cans to find something to eat or to collect aluminum cans to sell.

"The city of Houston has shown, over the many years, a hostile environment toward the homeless," said attorney Randall Kallinen, who plans to represent Kelly in court next month.

The veteran's story has also gone viral on social media. Kelly's supporters said his rights have been violated. Kelly is humbled by the support.

"All too often, you feel nobody [cares] whether you live or die, but the support coming around this thing does my heart good," said Kelly.

Some critics believe this crackdown on the homeless is linked to a feeding ordinance passed last year by the city. They think it is part of an ongoing effort to move the city away from downtown. Groups are now required to get permission from the city or private property owners before they can pass out meals to the homeless.

A representative for the mayor's office said the two issues are not related and there are more than 20 groups feeding the homeless.

The Houston Police Department also issued a copy of the ordinance that Kelly allegedly violated.

"The ordinance is specific to the Central Business District. It is a violation of city ordinance for anyone to remove any contents of any bin, bag or other container that has been placed for collection of garbage, trash or recyclable materials. (See the ordinance: Art. 1 Sec. 39-2, Houston Code of Ordinances). An officer has probable cause to issue such a citation when a person is seen opening a lid and rummaging through contents of a dumpster or trash can."

Kelly is scheduled to be in court next month. His attorney hopes to convince a judge to dismiss the charge.