login about faq

In the ActiveX ChilkatXML class, when I do this:

Set MyXmlChild=MyXml.NewChildBefore(1,"MyTag","MyContent")

it behaves the same as if I had put this instead:

Set MyXmlChild=MyXml.NewChildBefore(0,"MyTag","MyContent")

The code line that specifies index 1 should shove the current content of everything from index 1 and above, onto the next higher index, and then put in index 1 the current content. But it does not. Instead what is happening is it is saying, "ok 0 is before 1, so I will put this at index 0, and shove everything that is at index 0 and above, onto the the next higher index". This is wrong. I'm trying to insert a child node AT the current location. And I thought that that's what the NewChildBefore would accomplish. It would make the new child node at the current index, and shove everything after that up by one index, thus after the insertion, the new node WOULD exist before the current node that previously existed there. I'm not sure if this is a bug, or if it's behaving exactly as it's supposed to (and I'm just using this class incorrectly). If it's a bug, please fix it. If I'm using it incorrectly, please let me know how to insert a new child node at the current position, such that everything at and above the current position is shoved up by one index.

asked Dec 08 '14 at 06:35

Ben%20Hutchinson's gravatar image

Ben Hutchinson
63

edited Dec 08 '14 at 06:37


Thanks Ben,

I found and fixed the problem. Unfortunately, version 9.5.0.46 was just released, so this fix will be in the next official release. You can download the fix here:

32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip

64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-x64.zip

link

answered Dec 08 '14 at 08:55

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

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:

×2

Asked: Dec 08 '14 at 06:35

Seen: 646 times

Last updated: Dec 08 '14 at 08:55

powered by OSQA