Assume parentNode exists and I want to add an element "Child" to it. Following intutive code won't work:
$("<Child/>").appendTo(parentNode);
Because jQuery will create a node <CHILD> and append to parentNode.
So I am wondering, how do you add xml child node in jQuery?
p.s. Following ugly code will work, but it is really really ugly: parentNode.appendChild(parentNode.ownerDocument.createElement("Child"));
p.s.2 $(parentNode).append('<Child />') won't append the child node with jQuery 1.2.6 on FireFox 3. Actually it append nothing. If use appendTo(), it will append a node with name CHILD (all capital).