login about faq

<joblocation xsi:type="xsd:string">2321168</joblocation>

I am using xm23b->NewChild2("tns2:JobLocation",csLocationId); to create the xml, but I need to set the attribute for this element specifically as in the above example. Is there a way to do it?

Thanks

asked May 01 '13 at 15:06

RouteOptix's gravatar image

RouteOptix
1111


Call NewChild instead of NewChild2 so that the created XML child node is returned. Then set the attribute. In pseudo-code:

xChild = xm23b->NewChild("tns2:JobLocation",csLocationId);
xChild->AddAttribute("xsi:type","xsd:string");
delete xChild;   // (If C++)

link

answered May 02 '13 at 09:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×59
×1

Asked: May 01 '13 at 15:06

Seen: 1,121 times

Last updated: May 02 '13 at 09:26

powered by OSQA