Woah, let's back up a little and re-cap. You're saying the story of al-Khidr tells us the path of wisdom and integrity involves killing children because they may be disobedient to their parents. Like an ends-justify-the-means sort of thing. I could perhaps be excused for thinking that's a little fucked up. Anyone who did this today, most anywhere in the World, would go to prison or a psychiatric institution for a long time.
Before unsheathing the swords of indignation, let's consider this statement in the light of history and cultural relativism. Before around the 19th or 20th century, infant mortality was such that it did not seem sensible to consider children conscious or autonomous entities. They were, rather, considered a piece of property belonging to their parents, to do with as they saw fit. Usually, they were put to work as soon as physically able. They were not infrequently abused in any number of ways. It's often forgotten that the idea of "childhood" - a protected, carefree period of idyll and frolics is a recent one.
In the UK as far I remember, the first legislation enshrining the protection of children did not appear until around the 19th century, reflecting growing concern about children working in factories. This culminated in a slew of legislation known as the Factory Acts. Incidentally, we still purchase articles manufactured by children working overseas in pre-Factory Act conditions.
Right, now that we've recognised that we ourselves were pretty fucked up until pretty recently and still are in many ways, let's unsheathe those swords of indignation. No-one should be killing children, let's be clear. I'm aware that mystics and intellectuals of genius such as ibn 'Arabi have imbued the story of al-Khidr with profound metaphorical significance but I'll leave that explication for people more able than I. I'm concerned with the literal, lived reality. I do not like the idea that anyone has the right to kill children because they are disobedient or because they want to marry outside the tribe or because the voice of God commands them (see Abraham and Kierkegaard's reflections on his story).
It may be thought that I'm going full-tilt at a straw-man in a windmill here but these things have happened in the past and they happen today, here. The most highly publicised events frequently involve Muslim families and families from the Indian sub-continent. This is not because religion condones such actions but there is a cultural proclivity for them which is occasionally justified in religious terms. In some cultures, endogamy and other reflections of obedience are rules not preferences. Violation of these rules threatens family status and group cohesion and is punishable by death (so-called "honour killing"). The story of al-Khidr may reflect, legitimise and exemplify such actions. We should examine and address the socio-cultural and religious underpinnings of these tragedies to try to prevent them from happening.
This has been a rant and is slightly tangential to the topic. I apologise. I do not mean to say that the Qur'an or the Old Testament encourage killing children. The murder of innocents is condemned by both texts.
Ok, the node on ibn 'Arabi is very brief. For those who are interested I quote below the relevant portion of his book Fusus al-Hikam ('The Bezels of Wisdom') which contains his exegesis of the Khidr story :
"Moses was tested 'by many ordeals' 20:41 the first of which was the murder of the Egyptian 28:14-15, an act which he committed by Divine impulsion and with the approbation of God deep inside him, without however, his perceiving it; nevertheless he felt no affliction in his soul for having killed the Egyptian, although he himself was not acquitted until he had received a Divine revelation on the subject. For all prophets are interiorly preserved from sin without their being conscious of it, even before they are warned by inspiration.
"It is for that reason that al-Khidr showed him the putting to death of the boy, an action for which Moses reproached him, without remembering his murder of the Egyptian, upon which al-Khidr said to him: 'I have not done it of my own initiative,' recalling thus to Moses the state in which he, the latter, found himself when he did not yet know that he was essentially preserved from all action contrary to the Divine Order.
"He showed him also the perforation of the boat, apparently made to destroy the people, but which has, however, the hidden sense of saving them from the hand of a 'violent man.' He showed this to him as an analogy to the ark which hid Moses when he was thrown into the Nile; according to appearances, this act was equally to destroy him, but according to the hidden sense, it was to save him. Again his mother had done that for fear of the 'violent man,' in this case Pharaoh, so that he would not cruelly kill the child...
"Moses arrived then at Madyan, there met the two girls and for them drew water from the well, without asking from them a salary. Then he 'withdrew to the shade,' that is to say to the Divine shadow, and said: 'O my Lord, I am poor with regard to the blessings Thou bestowest on Me'; he attributed, then, to God alone the essence of the good that he did and qualified himself as poor (faqir) towards God. It was for that reason that al-Khidr reconstructed before him the crumbling wall without asking a salary for his work, for which Moses reprimanded him, until Khidr reminded him of his action of drawing water without asking for reward, and other things too, of which there is no mention in the Koran; so that the Messenger of God -- may God bless him and give him Peace! -- regretted that Moses did not keep quiet and did not remain with al-Khidr, so that God could tell him more of their actions."