XMLport and large texts
Christian_Wandborg
Member Posts: 23
Hi,
My XML-file contains an unspecified number of orders, and I’m using an XMLport to import orders from the file to my receiving table. Orders comes with an unspecified number of lines, and the lines include an element containing a product description. It’s likely that that the product descriptions contains large texts (e.g. 1000 - 4000 characters).
When the XMLport encounters product description element containing that many characters, it fails generating no error message.
Actually I don’t need the product description, and would rather skip this element, but I need suggestions on how to bypass it.
The following has been tried:
1. Element Properties:
Sourcetype = Text
TextType = Text
VariableName =Temp_Description
Code on the trigger: Product - Import::OnBeforeInsertRecord()
Temp_Description := ‘’;
2. Element Properties:
Sourcetype = Text
TextType = BigText
The above makes the port fail. That is, the XMLport import the orders until it encounter a product description containing a large number of characters.
Any suggestions please?
My XML-file contains an unspecified number of orders, and I’m using an XMLport to import orders from the file to my receiving table. Orders comes with an unspecified number of lines, and the lines include an element containing a product description. It’s likely that that the product descriptions contains large texts (e.g. 1000 - 4000 characters).
When the XMLport encounters product description element containing that many characters, it fails generating no error message.
Actually I don’t need the product description, and would rather skip this element, but I need suggestions on how to bypass it.
The following has been tried:
1. Element Properties:
Sourcetype = Text
TextType = Text
VariableName =Temp_Description
Code on the trigger: Product - Import::OnBeforeInsertRecord()
Temp_Description := ‘’;
2. Element Properties:
Sourcetype = Text
TextType = BigText
The above makes the port fail. That is, the XMLport import the orders until it encounter a product description containing a large number of characters.
Any suggestions please?
Regards
Christian
Christian
0
Answers
-
You have two possibilities:
1) Import through XMLDOM instead XMLPort
2) Use transformation to remove the elements before importing by xmlport. See examples how to remove namespaces, you can remove specific element in same way, just creating different transformation...0 -
Hi,
Actually, setting the element properties to
SourceType = Text,
TextType = BigText,
VariableName = MyVariable
makes the xmlport run through elements containing large texts. After all I need the contents (or part of) of the element, and was able to retrieve this by [RetLength] := BigText.GETSUBTEXT(Variable, Position [,Length]), found in help.
Thanks for responding
Regards
Christian0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
