I know this is going to come up eventually, so let's get it out of the way right now.
Hanna was a screenplay written back in 2004, X-23's first appearance on tv was back in 2003(though her comic origin miniseries wasn't until 2005). I'm leaving out the Cassandra Cain, or even child assassins before that DC character, as those aren't my concern for this. Suffice to say, Batgirl wasn't the first to do it, and Hanna won't be the last.
The main difference between Hanna and those other properties, as well as what's different with X-23, is that it questions one's own humanity, and how they attain that question. Hanna uses what seems like bio-engineering to raise the question just as X-23's story does.
Hanna's quandry is based around her being trained to be an assassin to exact revenge on the government groups that are after her father, finding her humanity along the way. Out of the wilderness and into the real world, she discovers so much that her father never prepared her for, she discovers life.
X-23's quandry is that of a young girl created through science raised by abusive corporate interests to be the ultimate assassin. She never had a constant contact with those that would show her love and compassion. Those that did would end up dead by her manipulated hand. Even her mother sacrifices herself to bring X-23 to freedom. Once in the world, like Hanna, she discovers life and emotion as well as family.
Where Hanna was raised by her father, X-23 was raised by abuse. Therein lies the main difference that leads to a different kind of story, though still posing the same questions.
These two are very similiar, even using the same overtones, but the outcomes, and paths to those outcomes are entirely different. Where one is the story of revenge, the other is a story of freedom. One was raised to kill by her father, the other was told to stop killing except in the name of justice by her mother. Both question what makes one human. Does it glorify children committing violence? Not exactly. It's that path of discovering more to life than what one was taught. That in spite of the violence they were raised around, and raised to commit, they discover life and the appropriate times to use that violence to protect life. They go from being a metaphorical sword, to a shield.
It's not about children killing others, it's about attaining life outside of violence. The stark contrast of innocence and violence. X-23 grew up never knowing what right and wrong were until she was free. She grew up surrounded by hate until she was free. Hanna was raised with that distinction through love and compassion, but found the world more complicated along the way. Both overcome how they were raised to become more than anyone ever expected.
Both have their merits, both pose interesting questions. One doesn't nullify the other, but they both are far more than simply children committing violence and glorifying it. It's about finding where you belong in the world your own way instead of the place others tell you or try to force you into.
There may be a follow up entry to this, but that'll have to wait until after April 8th, as I don't know what was changed from the aforementioned original Hanna screenplay. For that reason, I've left many details I could have used about X-23's story out as well.