Enabled Field No. Field Name Data Type Length Description Yes 1 Data Code 10 Yes 2 Mercato Code 10 Yes 3 Ora Integer Yes 4 PUN Decimal Yes 5 Nord Decimal
<?xml version="1.0" encoding="UTF-8" ?> <NewDataSet> <schema id="NewDataSet"> <element name="NewDataSet" IsDataSet="true" UseCurrentLocale="true"> <complexType> <choice minOccurs="0" maxOccurs="unbounded"> <element name="Prezzi"> <complexType> <sequence> <element name="Data" type="xs:string" minOccurs="0" /> <element name="Mercato" type="xs:string" minOccurs="0" /> <element name="Ora" type="xs:string" minOccurs="0" /> <element name="PUN" type="xs:string" minOccurs="0" /> <element name="NAT" type="xs:string" minOccurs="0" /> <element name="CALB" type="xs:string" minOccurs="0" /> <element name="CNOR" type="xs:string" minOccurs="0" /> <element name="CSUD" type="xs:string" minOccurs="0" /> <element name="NORD" type="xs:string" minOccurs="0" /> <element name="SARD" type="xs:string" minOccurs="0" /> <element name="SICI" type="xs:string" minOccurs="0" /> <element name="SUD" type="xs:string" minOccurs="0" /> <element name="AUST" type="xs:string" minOccurs="0" /> <element name="BRNN" type="xs:string" minOccurs="0" /> <element name="COAC" type="xs:string" minOccurs="0" /> <element name="CORS" type="xs:string" minOccurs="0" /> <element name="E_CO" type="xs:string" minOccurs="0" /> <element name="E_NE" type="xs:string" minOccurs="0" /> <element name="E_NW" type="xs:string" minOccurs="0" /> <element name="E_SD" type="xs:string" minOccurs="0" /> <element name="FOGN" type="xs:string" minOccurs="0" /> <element name="FRAN" type="xs:string" minOccurs="0" /> <element name="GREC" type="xs:string" minOccurs="0" /> <element name="MFTV" type="xs:string" minOccurs="0" /> <element name="PRGP" type="xs:string" minOccurs="0" /> <element name="ROSN" type="xs:string" minOccurs="0" /> <element name="SLOV" type="xs:string" minOccurs="0" /> <element name="SVIZ" type="xs:string" minOccurs="0" /> <element name="TBRV" type="xs:string" minOccurs="0" /> <element name="PBNF" type="xs:string" minOccurs="0" /> </sequence> </complexType> </element> </choice> </complexType> </element> </schema> <Prezzi> <Data>20080519</Data> <Mercato>MGP</Mercato> <Ora>1</Ora> <PUN>70,138844</PUN> <NAT>62</NAT> <CALB>60,77</CALB> <CNOR>60,77</CNOR> <CSUD>60,77</CSUD> <NORD>60,77</NORD> <SARD>75,12</SARD> <SICI>198</SICI> <SUD>60,77</SUD> <AUST>0</AUST> <BRNN>60,77</BRNN> <COAC>75,12</COAC> <CORS>75,12</CORS> <E_CO>75,12</E_CO> <E_NE>60,77</E_NE> <E_NW>60,77</E_NW> <E_SD>60,77</E_SD> <FOGN>60,77</FOGN> <FRAN>0</FRAN> <GREC>0</GREC> <MFTV>60,77</MFTV> <PRGP>198</PRGP> <ROSN>60,77</ROSN> <SLOV>0</SLOV> <SVIZ>0</SVIZ> <TBRV>60,77</TBRV> </Prezzi> <Prezzi> <Data>20080519</Data> <Mercato>MGP</Mercato> <Ora>2</Ora> <PUN>45,049720</PUN> <NAT>41,96</NAT> <CALB>37,96</CALB> <CNOR>37,96</CNOR> <CSUD>37,96</CSUD> <NORD>37,96</NORD> <SARD>37,96</SARD> <SICI>152</SICI> <SUD>37,96</SUD> <AUST>0</AUST> <BRNN>37,96</BRNN> <COAC>37,96</COAC> <CORS>37,96</CORS> <E_CO>37,96</E_CO> <E_NE>37,96</E_NE> <E_NW>37,96</E_NW> <E_SD>37,96</E_SD> <FOGN>37,96</FOGN> <FRAN>0</FRAN> <GREC>0</GREC> <MFTV>37,96</MFTV> <PRGP>152</PRGP> <ROSN>37,96</ROSN> <SLOV>0</SLOV> <SVIZ>0</SVIZ> <TBRV>37,96</TBRV> </Prezzi> </NewDataSet>
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
InFile.CREATEINSTREAM(IStream);
IStream.READTEXT(firstLine); ///first line is ok
Tempfile.WRITE(firstLine);
IStream.READTEXT(firstLine);
Tempfile.WRITE('<OrderLog>'); ///this line has junk so change tag
WHILE NOT (IStream.EOS()) DO
BEGIN
IStream.READTEXT(firstLine);
Tempfile.WRITE(firstLine);
END;
Tempfile.CREATEINSTREAM(IStream);
CLEAR(XML);
XML.SETSOURCE(IStream);
XML.IMPORT;
Hope you were talking to me...
I've used a function used elsewhere in NAV:
This removed xs schema that NAV does not like very much.
So I could import correctly the XML file in my Table.
Federico
MBS Specialist since NAV 2.0
My experiences on Linkedin