cancel
Showing results for 
Search instead for 
Did you mean: 

XML format problem

Former Member
0 Kudos

Dear all,

I am generating a XML file in AS400 FTP directory, XML file is generated correctly when I open in IE it opens with all the taggs in new lines but when I open it in notepad or editor all contents are coming in One line.

Is there any way I can get the Content same as it displayed in IE browser. is there any option available in File adapter?

NO File content conversion is used in File.

Chirag

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

As per our analysis-As400 FTP works differently than normal FTP also we have noticed that AS400 FTP truncate the XML file becasue of character limitations.

Chirag.

Former Member
0 Kudos

How is your XML file generated ? Using a XSLT or JAVA mapping ?

Former Member
0 Kudos

its from File adapter simple one to one graphical mapping is used.

also when I open the file in notepad with wrap option the structure is not coming in vertical format instead it is

<?xml version="1.0" encoding="utf-8" ?><ns1:MT_PurchaseOrderDetailDB_EDI xmlns:ns1="urn:Ducati-EDI:PurchaseOrderDetail"><RecordSet><FileEmpty>N</FileEmpty><FileType>U_ORDERS</FileType><FileCreated>20091211 093908</FileCreated><FileCompany>DUCATI MOTORS</FileCompany><Header><id_order_header>5500000011 00010</id_order_header><id_network>DUCATI_MOTOR</id_network><id_supplier>IT02451420968</id_supplier><id_ordertype>LPA</id_ordertype><IssueDate>20090706</IssueDate><OrderNumber>5500000011-00010</OrderNumber><DeliveryLocation/><FaxOrder>038/ 616110</FaxOrder><IssuerType>803</IssuerType><IssuerDescription>SGORBATI ALB. MOT.</IssuerDescription><ToBeCollected>N</ToBeCollected><GeneralDescription/><VatExcemption/><Currency>EUR</Currency><Payment>Bank transfer 90 days</Payment><Shipment/><Packaging/><ReturnNote>Ex Works</ReturnNote><Vettore/><SupplierCode>FF15937</SupplierCode><CurrentPayment>5500000011</CurrentPayment><CurrentShipment>2009-06-26</CurrentShipment><CurrentReturnNote>Ex Works</CurrentReturnNote><HeaderNote/><LineItems><id_order_line>5500000011 00010 0001</id_order_line><CounterLine>0001</CounterLine><IssuedDate>20090928</IssuedDate><IssuedQuantity>25.000 </IssuedQuantity><ProductCode>70010431A</ProductCode><Unit>ST</Unit><PriceUnit>ST</PriceUnit><IssuedPrice4Unit>32 </IssuedPrice4Unit><ConvRate>1 </ConvRate><I_Description>ALBERO MOTORE 1198

which is coming when it opens in IE.

chirag

is there any other way I cann

Former Member
0 Kudos

Hi, why don't you just download SOAP UI it's a freeware tools, to edit xml and also you can use to test your webservices.

http://www.soapui.org/

Regards.

Marco.

Former Member
0 Kudos

Hi,

what you need are CRLF elements in your textfile. Maybe could add them with a java mapping after the graphical mapping.

Regards

Patrick

Former Member
0 Kudos

Hi Chirag,

It is just a dispaly problem, so it should not be the issue.

But still if you are facing the same problem, then you can take that payload from SXMB_MONI, paste it in 'Test' tab of the corresponding message mapping, and there is an option of "Pretty Print", which will organise your structure and then from there you can copy the structure to notepad and view it.

-Tanaya.

Former Member
0 Kudos

Hi,

if you want to format the xml that it looks like this with every editor then I guess without Content Conversion it's not possible.

If you only want to display it somehow in a formatted way you have to use a browser or for example XML-Pad.

More information about viewing XML files could be found here:

http://www.w3schools.com/xmL/xml_view.asp

Regards

Patrick

Former Member
0 Kudos

patrick

I even have a same understanding - but once the XML file is generated in As400 FTP-AS400 Developer wanted to read that file and he want the file in the same manner in which IE displays.

Not all the element in one line.

chirag

Former Member
0 Kudos

Hi,

I must admit that I don't know so much about As400 systems. But the easiest way would be that the developer uses an editor with formatting funcitionality (XMLPad, .. ).

If this is not possible then content conversion is probably the only way to realize it.

Regards

Patrick

Former Member
0 Kudos

Try to open it first in IE and then right click on IE and select display source which will open the same code in notepad.

So, will this trick work for you?

Regards,

Sarvesh

Former Member
0 Kudos

XML identation is only a "display" feature, it does not matter within PI/XI, parsers do not need content to be "well formatted" ... IE does it automatically if XML structure is well formed (opening and closing tags, etc) !

In the builder, when using test features in mmapping or imapping, you have a button to format the XML input document in an indented way ...

Chris

Former Member
0 Kudos

Hi Chirag,

Open the file with WORDPAD, you can view the data as it shown in IE.

Cheers

Veera

Former Member
0 Kudos

Hi, which editor you use?? in the notepad go to the format button and choose WRAP

Regards

Marco