How to convert XML file into DTD or XSD

Hi Folks,
This is the output structure I need to get. My interface is file to file. Can u please let me know How do I create a data type or any XSD to get below Structure.
<?xml version="1.0" encoding="UTF-8" ?>
- <Command xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Command.xsd">
- <WriteTagData readerID="EasyDP">
- <Item>
- <FieldList format="C:\Documents and Settings\wlee\Desktop\Format_4A.btw" jobName="Test1" quantity="1">
  <Field name="PlantNo">4012</Field>
  <Field name="PlantName">ANE</Field>
  <Field name="SKU">12000001</Field>
  <  </FieldList>
  </Item>
  </WriteTagData>
  </Command>
Please help me How would I create Data type for this. Your help is highly apreciated
Thanks,
Enivass

Hi Enivas,
>>>>>>>>>Please help me how would I delete ns0.
For  remove ns0,  you have to do use XMLAnonymizerBean module  in adpater module (In Communication channel).
Insert the XMLAnonymizerBean before the CallSapAdapter .
The module name u2018CallSapAdapteru2019 is default one that can be left as it is.
Module Name : AF_Modules/XMLAnonymizerBean
Type: Local Enterprise Bean
Module Key: 0  
Add Parameters in the Module Configuration
2.       Module Key: 0
Parameter Name: anonymizer.acceptNamespaces
Parameter Value: <namespace> u2018u2019  
Enter a list of namespaces and their prefixes that are to be kept in the target XML document and to result a namespace without a prefix, enter u2018 u2018 (two single quotation marks).   In your case like namespace http://www.w3.org/2001/XMLSchema-instance follow with two single quotation marks.
3.       Module Key: 0
Parameter Name: anonymizer.quote
Parameter Value: u2018
Here specify the character to be used to enclose the attribute values.  The default value is u2018.  
When scenario is executed, the target message contains the namespace with no prefix.  
Then, you are not facing any issue in target messages.
Regards,
Rajesh

Similar Messages

  • Convert XML file into DTD using Java

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

  • Converting XML file to DTD or XSD file

    Hi everyone,
    We're currently doing an IDOC to File. The file should be in XML format. Right now, we have a sample XML file. We need to convert the file to DTD or XSD and then upload this in XI to be able to get it structure. We've tried different conversion tools to do this, however, the converted DTD/XSD file still has errors when we load it to XI. What we're thinking is to create a data type to achieve this. These are some of the fields in the file.
    <messageHeader creationDate>
    <catellae:gTTSDataDelivery creationDate="X" (...)>
    */<catellae:(…)>/<txnId>
    */<catellae:(…)>/<items>/<item>/<quantity>
    */<catellae:(…)>/<items>/<item>/<unitOfMea>
    */<catellae:(…)>/<items>/<item>/<prodDesc>/<matType>
    */<catellae:(…)>/<shipToAddress>/<nameAndAddress>/<city>
    */<catellae:(…)>/<shipToAddress>/<contactInformation>/<communicationChannel (…)
    It seems that there are more than 3 nodes. And in XI, only three nodes are allowed. Could you tell us how should we create the data type for this? Thanks in advance!

    Hi Mariel,
              Refer to the below link for conversion of XML to Xsd using Altova XML Spy.
    Re: data type for xml file
    For altova free trial Download:
    http://www.altova.com/download.html
    Please let me know if u need furthur information.
    Thanks,
    Bhargav.
    Note:Award points if found useful

  • How to convert xml file into internal table in ABAP Mapping.

    Hi All,
    I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">
      <BookingCode>2KY34R</BookingCode>
    - <Passenger>
      <Name>SARVESH</Name>
      <Address>THANE</Address>
      </Passenger>
    - <Passenger>
      <Name>RAJESH</Name>
      <Address>POWAI</Address>
      </Passenger>
    - <Passenger>
      <Name>CARRON</Name>
      <Address>JUHU</Address>
      </Passenger>
    - <Flight>
      <Date>03/03/07</Date>
      <AirlineID>UA</AirlineID>
      <FlightNumber>125</FlightNumber>
      <From>LAS</From>
      <To>SFO</To>
      </Flight>
      </ns0:MTO_ABAP_MAPPING>
    AT the receiver side I wnat to concatenate the NAME & ADDRESS.
    I tried Robert Eijpe's weblog (/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach)
    but couldnt succeed to convert the xml file into internal table perfectly.
    Can anybody help on this. 
    Thanks in advance!!
    Sarvesh

    Hi Sarvesh,
    The pdf has details of ABAP mapping. The example given almost matches the xml file you want to be converted.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
    Just in case you have not seen this
    regards
    Vijaya

  • How to convert HL7 file into an XML

    Hi All,
    I am new to HL7,can any one tell how to convert HL7 file into an XML.Give sample demo or related links.
    My sample HL7 file is as follows how can I convert.
    FHS|^~\&||Tax ID123^Lab Name123^L|||201110191435||HL7.txt||1234567|123||
    PID|seqno|123||john^chambers^^Dr^Dr|2456 california ave^San jose^CA^85254|19601212|M
    FHS|^~\&||Tax ID123^Lab Name123^L|||File Creaqted Date|File Security|FileName||File HeaderComment||Facility|FileCreatedDateTime|File Security|File Name|File Header Comment|FileControlId|Reference File Control ID|
    PID|seqno|patientId||LastName^FirstName^MiddleName^Title^Degree|Street^City^State^zip|patientDOB|gender
    <Report>
    <FileHeader>
    <FileSendingApplication> </FileSendingApplication>
    <TaxID>Tax ID123</TaxID>
    <LabName>Lab Name123</LabName>
    <FileSendngFacilityType>L</FileSendngFacilityType>
    <FileReceivingApplication></FileReceivingApplication>
    <FileReceivingFacility></FileReceivingFacility>
    <FileCreatedDateTime>201110191435</FileCreatedDateTime>
    <FileSecurity></FileSecurity>
    <FileName>HL7.txt</FileName>
    <FileHeaderComment></FileHeaderComment>
    <FileControlId>1234567</FileControlId>
    <ReferenceFileControlID></ReferenceFileControlID>
    <FileHeader>
    <Patient>
    <seqno> </seqno>
    <patientId>Tax ID123</patientId>
    <LastName>Lab Name123</LastName>
    <FirstName>L</FirstName>
    <MiddleName></MiddleName>
    <Title> </Title>
    <Degree></Degree>
    <Street></Street>
    <City></City>
    <State>HL7.txt</State>
    <Zip></Zip>
    <patientDOB>1234567</patientDOB>
    <gender></gender>
    <Patient>
    </Report>
    Thanks
    Mani

    Hi Prabu,
    With input as in single line I'm able to get the the output but with the multiple lines of input,error was occured.Any suggestions.
    Error while translating. Translation exception. Error occured while translating content from file C:\temp\sampleHL7.txt Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.
    The payload details for this rejected message can be retrieved.          Show payload...
    Thanks
    Mani

  • How to convert XML file to an internal table ?

    Hi All,
    I want to do a batch input program. The source data would be given as an excel file . I would like to know how to convert XML file to internal table properly. Please help me out..
    Thanking you in advance ..
    Shankara Narayanan T.V

    Hi Shankar,
    use 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file1
                  i_begin_col             = '1'
                  i_begin_row             = '5'
                  i_end_col               = '40'
                  i_end_row               = '16'
             TABLES
                  intern                  = it_intern
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    LOOP AT it_intern.
          AT NEW row.
            CLEAR it_intern.
          ENDAT.
            CASE lv_flag.
        Production Version
              WHEN  1.
                it_master-matnr      =   it_intern-value.     
              WHEN  2.
                it_master-werks      = it_intern-value.
              WHEN  3.
                it_master-verid      = it_intern-value.
              WHEN  4.
                it_master-text1      = it_intern-value.
              WHEN  5.
                it_master-fdate     = it_intern-value.
          AT END OF row.
            APPEND it_master.
          ENDAT.
        ENDLOOP.
    -Anu
    Message was edited by:
            Anupama Reddy

  • How to convert jpeg files into word

    How to convert jpeg files into Word

    Hi Eugene,
    I don't think you can convert an image to a Word document, but you could place the JPEG into a Word document using the Insert > Object command in Word.
    For other questions relating to Word, you will probably have more luck getting an answer if you post on the Microsoft forums (we can help if you're using Acrobat, or another Adobe product, but you'll find the Word experts on the Microsoft forums.)
    Best,
    Sara

  • How to convert XMl file to XSD file

    how to convert XMl file to XSD file ?
    i have a xml file format  it has to be converted to xsd file through ABAP .
    Regards
    Anbu B

    i got the answer....
    Regards
    Anbu B

  • How to convert Doc file into image

    hello frnds
                     Can any body guide me how to convert doc file into image and show into swf loader.
    actually i have to convert doc files into swf files in runtime so that i have to use this flow.
    is it possible to convert doc file into byte array and than convert into image.
    Thanks And Regards
        Vineet Osho

    You can convert any DisplayObject to byeArray using this function ImageSnapshot.captureBitmapData().getPixels()

  • How to convert Property files into Java Objects.. help needed asap....

    Hi..
    I am currently working on Internationalization. I have created property files for the textual content and using PropertyResourceBundles. Now I want to use ListResourceBundles. So what I want to know is..
    How to convert Property files into Java Objects.. I think Orielly(in their book on Internationalization) has given an utitlity for doing this. But I did not get a chance to look into that. If anyone has come across this same issue, can you please help me and send the code sample on how to do this..
    TIA,
    CK

    Hi Mlk...
    Thanks for all your help and suggestions. I am currently working on a Utility Class that has to convert a properties file into an Object[][].
    This will be used in ListResourceBundle.
    wtfamidoing<i>[0] = currentKey ;
    wtfamidoing<i>[1] = currentValue ;I am getting a compilation error at these lines..(Syntax error)
    If you can help me.. I really appreciate that..
    TIA,
    CK

  • Convert XML file into PDF file

    <b>XML to PDF</b>i want to Convert XML file into PDF file pl. any one can suggests API's

    Hi,
    There are many ways to convert XML files to PDFs through java.
    One of the easiest way is by using iText.jar which have classes for conversion.
    The following are the required steps
    1. Create a document object for the XML file ( Using DOM or SAX parser).
    2. Parse the xml document and extract the content to write in PDF.
    3.Create a itext Document object.
    4.Get a PdfWriter instance for the PDF file.
    5.Write in the pdf the extracted text using the document object.
    Refer <a href="http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/HelloWorld.java">here</a> for a simple pdf writer example.
    Refer <a href="http://java.sun.com/developer/codesamples/xml.html">here</a> for examples of XML Parsers.
    Regards,
    Uma

  • Convert xml file into Image file

    Hi,
    How to transform xml file into image file?.
    i don want to transform the xml file into html file.
    Thanks,
    nithi

    One way I can think of is to create a java.awt.BufferedImage, and use its Graphics object to print out the xml (count the lines first, and space them to your liking). Then if you want to save it to e.g. png or jpg there are free libraries for that, whose names I don't remember at the moment... Dunno why you'd wanna do this though :)

  • HT204382 How to convert VOB files into MP4 ? Tks

    Hi, anyone knows how to convert VOB files into MP4 ones ?
    Tks

    http://forums.macrumors.com/showthread.php?t=812985
    The procedure is dated and I will assume that the DVD is not copy-protected since discussion of such things is verboten.

  • How to convert .stl file into .xml file. Subtitles to IMPORT INTO FCPro

    I have a subtitles file which was created in dvd studio pro. I exported that file and made a .stl file (which can be opened with TextEdit).
    I need to import that file into FCP to then make a quicktime file w/subs to be exported.
    I'm trying to use TitleExchange which tells you you CAN convert .stl files into .xml (FCPro type of file) but when I try to import the .stl subtitle file into TitleExchange to be converted to .xml I get the following error:
    Can't make "" into type boolean. (-1700)
    Can someone help?
    Thanks!!!
    Paula

    Can anyone help me?
    I absolutely need to import the subtitles into Final Cut and re-writing all of them manually would take forever.
    Please let me know if there is any program I need to use.
    Thanks for all tips
    Paula

  • How to convert Xls file into Xml file

    Hi,
    I am trying to convert Xls file into Xml  but there  is no any direct procedure for it
    Pls help me out to convert Xls file into Xml file
    Thanks
    Anushree

    you will require to write a module in your file adapter for the same.
    ref: /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter as mentioned in the earlier post.
    Else you can also use Conversion Agent to read the same.
    Ref: http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm

Maybe you are looking for