I am using the xmldom automation to create an Item Export. (I have NAV 2009 R2)
My one problem is that I have a blob field with text that is over 1024 characters.
How can you write to a node if you have more than 1024 characters?
xmlnode.text := bigtext unfortunatley does not work. Maybe I could use a variant variable or is there an xmldom command to add text so I could call it multiple times?
0
Answers
I can do this:
Node.Text := first 1024 characters;
nodetext.appendData(second1024 characters);
nodetext.appendData(third1024 characters);
etc...
The only problem now is I can't figure out how to instantiate the nodetext automation variable. The variable is 'Microsoft XML, v6.0'.IXMLDOMText. It compiles when I do nodetext := node; but I get an error during runtime.
Anyone know how to instantiate a nodetext variable of type automation ('Microsoft XML, v6.0'.IXMLDOMText)?
jwilder@stonewallkitchen.com
An alternative way would be to export the data with an xmlport property of the text field to BigText and use the AddText method.
Based on your post I was able to get this to work so thanks a lot!
I ended up with this:
variables:
NewNode 'Microsoft XML, v6.0'.IXMLDOMNode
xmlTextNode 'Microsoft XML, v6.0'.IXMLDOMText
TextArray - Text1024 Dimensions=2
xmlTextNode := XMLDoc.createTextNode(TextArray[1]);
NewNode.appendChild(xmlTextNode);
xmlTextNode.appendData(TextArray[2]);
This is just a snipet and does include creation of xmldoc and elements. Newnode was already instantiated so you don't see that here. TextArray[1] has 1024 characters of data in it as does TextArray[2].
jwilder@stonewallkitchen.com
Can you mark the topic as solved?