How to append a node with attribute

L

Liu Feng

Hi,
How to append a node with attribute to DOM?
My schema also have the attribute, such as

<LKTestArea ID="1">abc</LKTestArea>

How do I append a new node?

--


Thanks,
LiuFeng
MSN Messenger: (e-mail address removed)
 
G

Greg S

I'm assuming you're talking about appending using code or script.

The only way I've been able to do it for schemas that I've built in
InfoPath, is to use the cloneNode(true) method on an existing node to make a
copy, then update the attribute(s), and append it to the parent. I haven't
been able to come up with any other way.
 
L

Liu Feng

Hi, Greg S
Thanks for you opinion, I work out it.

--


Thanks,
LiuFeng
MSN Messenger: (e-mail address removed)


I'm assuming you're talking about appending using code or script.

The only way I've been able to do it for schemas that I've built in
InfoPath, is to use the cloneNode(true) method on an existing node to make a
copy, then update the attribute(s), and append it to the parent. I haven't
been able to come up with any other way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top