Import Long text from XML nodes into NAV

DRBDRB Member Posts: 105
Hi,

I want to import an xml, which has Node data size more than 1024 characters. If I use a variable of type Text (BigText) in the XMLPort and then use CREATEOUTSTREAM to assign this text value to a BLOB field in NAV table, then the format (white space, next line etc.) of then line gets distorted.

And instead of using Text/Bigtext, if I use the BLOB field in the XMLPort then it gives error

"The length of the text string exceedst the size of the string buffer."



I am using NAV2009 R2.



What are other possibilities? Please help.
-Dhan Raj Bansal
Linkedin Profile: http://in.linkedin.com/in/dhanrajbansal

Comments

  • DRBDRB Member Posts: 105
    Does anyone have any idea on this issue?
    -Dhan Raj Bansal
    Linkedin Profile: http://in.linkedin.com/in/dhanrajbansal
  • Erik_LaarmanErik_Laarman Member Posts: 4
    I had the same problem (NAV 2013 RTC).
    Solved it by setting XML-port-property "PreserveWhiteSpace" to Yes.
    Microsoft Dynamics NAV supports the XML standard by normalizing white space in attribute names and values that are imported through an XMLport. Unfortunately it also deletes CR/LF from the actual data ](*,)

    Hope this helps,

    Regards,

    Erik 8)
  • vaprogvaprog Member Posts: 1,141
    Unfortunately it also deletes CR/LF from the actual data ](*,)
    "actual data" is purely in your own personal interpretation or maybe is defined in a document definition, that NAVs XMLPort does not care about.
    The XML standard defines everything that is not markup as "character data", all white space included. (http://www.w3.org/TR/2006/REC-xml11-20060816/#syntax)

    NAV's approach makes some assumptions that might hold true frequently, provided your files contain data that could be stored with simple field types in a database table.
  • rmv_RUrmv_RU Member Posts: 119
    XML Text Node object ('Microsoft XML, v3.0'.IXMLDOMText) has SubstringData method, you can use it for reading large texts.
    Also, look at this viewtopic.php?f=23&t=44086 topic.
    Looking for part-time work.
    Nav, T-SQL.
Sign In or Register to comment.