Add a namespace
fabou3377
Member Posts: 11
Hi,
i want export a xmffile from Navsion with a namespace. I need a namespace for a another application. I can't just add it. The file is created but without lines...
Thanks for your furture help.
i want export a xmffile from Navsion with a namespace. I need a namespace for a another application. I can't just add it. The file is created but without lines...
Thanks for your furture help.
IF ISCLEAR(xmlDom) THEN
CREATE(xmlDom);
tempTable.PICTURE.CREATEOUTSTREAM(xmlOutStream);
xmlOutStream.WRITETEXT('<item xmlns="http://lalima"');
//XMLPORT.EXPORT(XMLPORT::"itemlalima",xmlOutStream,item);
tempTable.INSERT();
tempTable.Picture.CREATEOUTSTREAM(xmlOutStream);
xmlDom.load(xmlOutStream);
xmlDom.save('C:\temp\items.xml');
0
Comments
-
Hello fabou3377,
Adding a namespace to an XML export is quite easy. You have to do it in the XML port designer. Add an attribute to the first element in your XML port (in your case, it would be an attribute called xmlns). The attribute must be indented and source type text. Data source could be just about anything, but xmlns1 seems logical. Next, in the OnPreXMLport trigger you write the following code:xmlns1 := 'http://lalima';
I hope this solves your problem.
Cheers!0 -
I am trying to do data integration for purchase header table from navision.
first i created an xmlport to export the data out of navision
now i want to import some data through xmlport into purchase header,
but it is gving error ....regarding some namespace...schema is not there
i dont know how to create xml file for import.
can anyone pls tell me
the xmlport i created for export is like this ...
afterwards what to do to import different data
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
- <Purchaseheader>
- <Purchase_Header MBS_Navision_URL="navision://client/run?servername=nav%26database=databasename%201135%26company=companyname%26servertype=MSSQL%26target=Form%2050%26view=SORTING(Field1)%26position=Field1=0(1),Field3=0(1)">
<Document_Type>Order</Document_Type>
<Document_Number>1</Document_Number>
<Number>1</Number>
<Name>SMART TECHNOLOGIES</Name>
<Address>#10/2, VICTORIA ROAD</Address>
<Address2>NARENDRA PLAZA</Address2>
</Purchase_Header>0
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