XMLNode attribute value truncation

G

Gareth

Hi,
I seem to be finding that setting an XMLNode attribute's nodeValue field
truncates at approximately 15k of data, it does so without warning or error
it just happens. As a workaround i've been storing data in document
variables and storing the document variables key in the attribute. But even
then large chunks of data get truncated (with error) and i'm forced to do
some elaborate choping and changing to store the required data in document
variables. Any better suggestions? I need to store significant amounts of
data in a non document visible manner but associated with the XMLNodes in
the document so I can retrieve it depending on which node context the user
is working with.

Gareth
 
W

Wei-Dong XU [MSFT]

Hi Gareth,

From my understanding to this issue, you are going to store a bundle of data in the attribute of one xml node. Then during the edit, you can retrieve
the data for your scenario.

My suggestion is:
1) please define one global variable in the VBA module, for example:
public xmlstring as string
2) then set the xml string to this variable.
3) After that, use XML object to load the xml from this variable and manipulate them

This way, you can also modify the xml element by reading the data from other xml file or db or any other data source your VBA can access. Then
after your modification on the xml, with the help of VBE Object, you can also change the VBA macro code for the xmlstring value so that your xml
info can be persisted in the doc file.

Please feel free to let me know if you have any further questions.

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei-Dong XU [MSFT]

Hi Gareth,

For more info regarding VBE, please go to:
VBE Object
http://msdn.microsoft.com/library/en-us/vbext98/html/vaobjvbe.asp

One 3rd party good article on VBE
Programming To The Visual Basic Editor
http://www.cpearson.com/excel/vbe.htm

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft
does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any
representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any
software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from
the Internet.
 
Top