XML file creation and saving

Hi I am looking for a simple way of creating a xml file, populate it with data and saving it. Is there any simple way to achieve this ?

What API/language are you using?
If it's Cocoa look at NSXMLDocument
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSXM LDocument_Class/Reference/Reference.html
Eric

Similar Messages

  • Flash Pro CS6 BUG - inconsistent end of line for xml files in library saved in xfl - MESSES UP SVN

    When saving in XFL with Flash CS6 on Mac (it also happened in CS5.5), the generated xml files in library often have inconsistend end of line, which blocks SVN commits and I have to manually go in the files and make them consistent.
    The XML nodes themselves all have \r\l as end of line, while, within <[CDATA[]]>, they only have \r.
    We think this happens only when creating new library items on mac, on windows it doesn't happen.
    This slows us down incredibly when working on a team using svn.
    SVN doesn't upload files with inconsistend line ending.
    Line ending shoul be consistent within the same xml file to make svn operations smooth.
    Check an image of the bug:
    http://www.pippoflash.com/_test/flash_bug_eof.png
    you can see clearly the differences.
    thank you
    Filippo

    Thanks Filippo, I could see that now!
    While I was investigating this, I found that this is even happening on a file created and saved on just Windows. I was able to reproduce this using the following steps
    - Create a new AS3 file on Windows
    - Drag out a component to the stage say a Button component from the User Interface section of the Components panel
    - Convert the button component to a Movie Clip Symbol
    - Save the file as XFL and examine the Library XML files (the End of Line is just 'LF' in CDATA section whereas it is 'CR LF' everywhere else)
    Since you were saying 'Items created in windows have no problem', does that means, SVN can commit those without any issues for you? And do you face problem only when the file is Created and Saved on Mac(where the end of line is just LF every where) but Modified and Re-saved on Windows(where the end of line is inconsistent)? 
    Thanks!
    Mohan

  • How to find PG.xml file name and path associated with a FUNCTION

    Hi,
    I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
    OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
    How to find PG.xml file name and path assoicated with above funtion.
    Thanks,
    ashok

    Ashok,
    Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
    OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
    OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Dates of file creation and other activities

    I purchased my computer in early February of 2006 with system 10.4 installed. I set the date and time using preferences. Since that time all my file creation dates seen in Finder window "Preview" are given as 2006/01/05 (international standard format). However if I hit the "More info" button the correct dates are given on the detail panel and also the correct times of the occurrences.
    ITunes shows the dates of last playing in the incorrect way also on its index page.
    Where does the incorrect date originate and how can I get it to agree with the date set on the computer?
    iMac G5   Mac OS X (10.4.8)  

    If you're using some flavor of Windows, then the attached VI can grab the file creation date, along with some other usful file info. All the info is returned as strings so it's easy to use as you need.
    This is saved in ver 6.0.2, but it upgrades OK.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    Get_Windows_File_Info.llb ‏118 KB

  • Event based xml message creation and sending to an ESB

    Hi,
    what's the easiest way, to trigger xml message creation based on certain event (e.g. change of the contract) and to automaticaly send it to ESB - IBM websphere in this case? So it's not clasical web service call, more like an event driven architecture. BAdI for Inform Of Contracts Change is available in this case.
    Thanks in advance!

    Hi UjwalKumar,
    Follow this link:
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    This blog gives an excellent description of 'FILE to Proxy' scenario.
    what you need is XML to proxy...i.e. your scenario is very similar to this one...only diffrence is  that  , you wont be using FCC .since your source msg is in XML format..
    Hope this helps..
    Regards ,
    Sushil

  • XML Creating, editing and saving! ;D

    Hey!
    So, here's what I want to do:
    When the users loads the Flash File, I want the ActionScrip to create an XML file that says:
    <id="000000" tutorial="no" name="000000" coins="3000">
        Now, I want the flash file to see that the user hasn't completed the tutorial.. and if it says NO it should load: tutorial.swf
    Then, once the tutorial.swf end, after the final button is clicked I want it to edit the XML file so that tutorial="no" is replaced with tutorial="yes" and it loads 'user.swf' And when the FlashFile is reloaded, it checks that the tutorial="" says yes, and it skips out tutorial.swf and it goes straight to user.swf..
    If it's not clear I'll show it below:
    Load tutorialcheck.swf
    If tutorial="" says no load tutorial.swf
    If tutorial="" says yes load user.swf
    Load tutorial.swf
    If tutorial is complete, on final button click edit XML and say tutorial="yes", then load user.swf
    Thanks!

    Hi
    Although not directly related to your problem, you can find an example of loading, editing and saving xml here.
    I have created a demo of Loading,Editing & Saving XML To/From Flash.
    You can find the Demo here http://demo.thefeldkircher.org/flashxml/xmlles/xmlls.htm
    You can find the How-To here http://blog.thefeldkircher.org/?p=262
    Hope it helps.

  • Regarding xml file sequence and sales order sequence not equal

    Hi frnds,
                                     The XML File generates after sorting the line items, the sorting is done alphabetically on material master codes but the when the program converts the XML to Sales orders, the line item numbers does not matches with the line item of the XML File, like to understand how the XML conversion happens and is it possible to keep the same sequence of the XML file?
    Regards,
    Jaya.

    And This is a xml details to read
    <ENV:Envelope TransactionID="234567" xmlns:ENV="schemas-hiwg-org-au:EnvelopeV1.0">
         <ENV:SenderID>ABC</ENV:SenderID>
           <ENV:RecipientID>XYZ</ENV:RecipientID>
           <ENV:DocumentCount>1</ENV:DocumentCount>
         <Documents>
              <PurchaseOrder RecordType="10" xmlns="schemas-hiwg-org-au:PurchaseOrderV2.0">
                     <TradingPartnerID>C42000</TradingPartnerID>
                     <MessageType>ORDERS</MessageType>
                     <VersionControlNo>2.0</VersionControlNo>
                     <DocumentType>220</DocumentType>
                </PurchaseOrder>
           </Documents>     
           <Document_Lines>
              <row>
                   <ItemCode>Nylon Black</ItemCode>
                   <Quantity>2</Quantity>
              </row>
              <row>
                   <ItemCode>Nylon White</ItemCode>
                   <Quantity>3</Quantity>
              </row>
         </Document_Lines>
      </ENV:Envelope>
    But this event is fileted with this result message
    "Mapping from LocalObjectType Envelope to object Type failed."
    I've tried to use ENV:Envelope logical objecttype instead of Envelope. But result is same.
    I hope someone can help me
    Thanks

  • XML File Creation Problem in FTP Server

    Hi.. Experts
    My Internal Table is as follows
    Types: Begin of ty_xmlfile,
             xmlline(60000)        type C,
           End of ty_xmlfile.
    Data: it_xmlfile type standard table of ty_xmlfile,
            wa_xmlfile type ty_xmlfile.
    When I download the file to my desktop using  GUI_DOWNLOAD. It works fine
    CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                BIN_FILESIZE = lv_size
                FILENAME     = lv_file_name
                FILETYPE     = 'ASC'
              TABLES
                DATA_TAB     = it_xmlfile
              EXCEPTIONS
                OTHERS       = 10.
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    In the debug mode when I download the internal table(IT_XMLFILE) into an excel file it doesn't open and it says tag is missinig(/basic_material_text) and also when I create the file in Application Server and transfer it to FTP Server it doesn't open there..and also in debug mode I find the length until  DIMENSION AN.. for that row when I double click on that line in debug mode it shows all the text until </baisc_material_Text>
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0&quot; LG.(F)                      (A)ASTM A276 CONDITION &quot;A&quot; 317LTYPICAL MILL CERTS REQ&apos;D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AN*
    The above statement is incomplete when the file is open in FTP Server.
    But when the file is created on to my desktop. It displays all the text....
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0" LG.(F) (A)ASTM A276 CONDITION "A" 317LTYPICAL MILL CERTS REQ'D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AND WILL BE USED AS RECEIVED(T) = TO FINISH TO THIS DIMENSION FOR FORGING AND BILLET MATERIAL ONLYVENDOR TO SUPPLY THE FOLLOWING ENGINEERING/QUALITY ASSURANCE DATATYPICAL MILL TEST CERTIFICATES/CERTIFICATES MUST ACCOMPANY THE MATERIAL.* COPIES REQUIRED:(2)ALL CERTIFICATES MUST HAVE LIGHTNIN PART NO.CLEARLY MARKED ON THEM.* COPIES REQUIRED:(2)</basic_material_text> *
    I could not understand why it takes only until DIMENSION AN
    Any suggestions would be very helpful...
    Thanks,
    Chaitanya
    -Points will be awarded for helpful answers.

    Hi...
    I think each XML Line will be of length 256. So I have to split the String into 256 of each Line.
    XML DOM Processing in ABAP part I -  Convert an ABAP table into XML file using SAP DOM Approach.
    Hope  it works out....I will try for that and Close the Post...
    Thanks,
    chaitanya K

  • XML file creation in Tool 8.45

    Hello All,
    I am on tools 8.45. I have a requirement to create an XML file from peoplesoft and send it to an ESB server(Enterprise Service Bus).
    How can i achieve this. I need to do delta as well as full publish.
    For example whenever there is job data update i need to send the a file to the esb server and at the end of the day i need to send a large single file again
    Can i acheive this in PS 8.8 and tools 8.45

    May be try to define as below and see what happens.
    types : gty_line_t(100) TYPE x.
    data : gt_restab        TYPE STANDARD TABLE OF gty_line_t,
             <gs_restab>        LIKE LINE OF gt_restab.
    OPEN DATASET l_file_name FOR OUTPUT IN BINARY MODE .
              IF sy-subrc = 0.
                LOOP AT gt_restab ASSIGNING <gs_restab>.
                  TRANSFER <gs_restab> TO l_file_name.
               endloop.
              endif.
    CLOSE DATASET l_file_name.

  • Wait XML File Generation and Present in APEX

    Hi All,
    I need advice on how can I implement following -
    I will be creating Input XML file using database procedure called from APEX, which will then go and executed the call using web services and create output XML file in one of the output directory. What I need help is -
    1. Once execute the initial call, then I need to be keep looking for file under output directory. Once the file is generated then I can show it on APEX, but I would like to know how can I implement, so continuously watch the directory for the file and as soon as file generated pick that file and present on APEX and stop watching directory for file.
    2. Also APEX will be used by many users concurrently, so how can I create and direct unique file for their own sessions, so myfile should not go to another user?
    Please advice

    There are lots of thread on ingesting XML and generating XML in this forum. Have a read through some of them and you should get some ideas on where to start. In particular look for threads on rcreating elational views of XML documents and using the SQL/XML Operators

  • XML File generation and watching continuously on directory present on APEX

    Hi All,
    I need advice on how can I implement following -
    I will be creating Input XML file using database procedure called from APEX, which will then go and executed the call using web services and create output XML file in one of the output directory. What I need help is -
    1. Once execute the initial call, then I need to be keep looking for file under output directory. Once the file is generated then I can show it on APEX, but I would like to know how can I implement, so continuously watch the directory for the file and as soon as file generated pick that file and present on APEX and stop watching directory for file.
    2. Also APEX will be used by many users concurrently, so how can I create and direct unique file for their own sessions, so myfile should not go to another user?
    Please advice

    Hi Keith
    11g uses the EPG so the images are stored in the database, however are also accessible as a webfolder. This is the same as (or very similar to) XE which I've previously successfully installed this on. The files have been uploaded to the images directory as I'm able to reference /i/sample.html in the iframe successfully. I've never needed to change the .xml file and run apxldimg script, a simple copy and paste has always worked. However, I will try this just to make sure.
    Hi Denes
    I've tried putting in the absolute path of the directory, which I assume you mean the full path i.e. http://localhost:8080/images/charts_library. But this makes no difference. I know there are differences with 11g, the EPG and that you have to open http://localhost:8080/images/ as a web folder rather than http://localhost:8080/i/ to access the files in the images directory. However, the database that your example application on http://htmldb.oracle.com is running on is an 11g database. It's running 11.1.0.6.0 the same as my database, so it must be possible and by the fact you didn't know this I assume you didn't need to make any changes to make it work!
    Sara

  • How can I make an XML file print �, � and �

    When I write an xml file by hand I can use the European alphabet and the letters �,� and �. I can also write to an ordinary text file from my Java code and still be able to display the letters as they should.
    But when writing to an xml file in my Java code the letters are converted to some weird mishmash characters.
    Why is this? What can I do?
    // Elin

    I'm assuming you are working on a Windows computer (although you can run into this on any computer.)
    If you don't tell java the kind of character encoding you want, then you get an assumed desired character encoding - in Windows, the OEM characterset which does not include the characters you are trying to write.
    A way to handle this is to output the kind of file you really want - that is - with the encoding you want. I suggest you might try UTF-8, which you can get by simply instantiating your output writer with the encoding string "UTF-8".

  • Compare two XML files: Analysis and Design

    Hi, Java/XML/JDOM experts,
    I realised that an open source of Java utility to compare two XML is still missing. So I would like to write one for my JDOM excises.
    I plan to do it in three steps:
    1.Define the problem domain.
    2.Design the classes to be developed.
    3.Coding
    Below is the problem domain. Would you review it and tell me if it is fine?
    Best regards,
    AG
    Compare two XML files
    Schema assumption:
    The xml files used for the comparison must have the same schema.
    Definition:
    1. Two elements of simple type are said equal if their name and value are identical.
    2. Two elements of complex type are said comparable if their name, attributes are identical.
    3. Two elements of complex type are said equal if they are comparable and their children elements are identical.

    Hi,
    Thanks for reviewing my idea.
    The xml files used for the comparison must have the
    same schema.Including not having a schema at all? And if they do
    have a schema, must they be valid according to the
    schema?I will only support schema based xml files. To include a schema is a good practice. So I will valid them agaisnt schema (is this possible with JDOM? I am testing ...)
    >
    2. Two elements of complex type are said comparableif
    their name, attributes are identical.
    3. Two elements of complex type are said equal ifthey
    are comparable and their children elements are
    identical.Do you plan to require child elements to appear in the
    same order for the two documents to be equal? (Note
    that XML specifically says that the order of
    attributes is not significant.)No. The order is not significant as I use the attributes as the keys to find comparable element counterpart.
    Here is the sample code already tested. Any comments are welcome!
    The next step is to define the "delta xml schema" that will guide me to store the comparasion results. Do you have any suggestions?
    Regards.
    AG
    public static boolean comparable(Element element1, Element element2)
         boolean returnValue=false;
         if (element1.getName()!=element2.getName()) {
              return returnValue;
    } else {
              returnValue=true;
                        System.out.println ("place 2");
         List attributeList=element1.getAttributes();
         Iterator attributeIterator=attributeList.iterator();
         Attribute workingAttribute=null;
         while (attributeIterator.hasNext()) {
                             if (!workingAttribute.getValue().equals(
                             element2.getAttribute(workingAttribute.getName(), workingAttribute.getNamespace()).getValue()))
                                  returnValue=false;
                                  break;
         return returnValue;

  • XML file creation

    I am trying to write XML file from xPath with corresponding
    values from database. Below are the part of xpath's and values in
    1. I am trying to write as XML file with this format in 2(this is
    part of file). Could any please tell me how to write this file?
    1)
    ReturnDataState/FEIN
    ReturnDataState/NameControl
    ReturnDataState/OriginalSubmissionID
    ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/AddressLine1
    ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/AddressLine2
    ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/City
    ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/State
    ReturnDataState/BusinessEntity/Header/HdrAddress/Address/USAddress/ZIPCode
    ReturnDataState/BusinessEntity/Header/HdrAddress/AddressChange
    ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/AddressLi ne1
    ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/AddressLi ne2
    ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/City
    ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/State
    ReturnDataState/BusinessEntity/Header/HdrAddress/StateOfIncorporation/USAddress/ZIPCode
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/AmendedReturnIndicator
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/AttachmentFiledIndicator
    0
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/CalendarYearFilerIndicator
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/DebtIndicator
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120AIndicator
    0
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120HIndicator
    0
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120Indicator
    1
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/Fed1120SIndicator
    0
    ReturnDataState/BusinessEntity/Header/HdrCheckBox/FedConsIndicator
    0
    2)
    <?xml version="1.0" encoding="UTF-8"?>
    <ReturnDataState>
    <FEIN></FEIN>
    <NameControl></NameControl>
    <OriginalSubmissionID></OriginalSubmissionID>
    <BusinessEntity>
    <Header>
    <HdrAddress>
    <Address>
    <USAddress>
    <AddressLine1></AddressLine1>
    <AddressLine2></AddressLine2>
    <City></City>
    <State></State>
    <ZIPCode></ZIPCode>
    </USAddress>
    </Address>
    <AddressChange></AddressChange>
    <StateOfIncorporation>
    <USAddress>
    <AddressLine1></AddressLine1>
    <AddressLine2></AddressLine2>
    <City></City>
    <State></State>
    <ZIPCode></ZIPCode>
    </USAddress>
    </StateOfIncorporation>
    </HdrAddress>
    <HdrCheckBox>
    <AmendedReturnIndicator></AmendedReturnIndicator>
    <AttachmentFiledIndicator>0</AttachmentFiledIndicator>
    <CalendarYearFilerIndicator></CalendarYearFilerIndicator>
    <DebtIndicator></DebtIndicator>
    <Fed1120AIndicator>0</Fed1120AIndicator>
    <Fed1120HIndicator>0</Fed1120HIndicator>
    <Fed1120Indicator>1</Fed1120Indicator>
    <Fed1120SIndicator>0</Fed1120SIndicator>
    <FedConsIndicator>0</FedConsIndicator>

    These links should help you. The process is pretty simple.
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=ColdFusion_Documentation&file=part_dev.htm
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=ColdFusion_Documentation&file=part_dev.htm

  • XML file input and parsing

    In looking through the documentation for XML handling, I can
    find no command for something as basic as how to read in a local
    XML file for parsing and processing.
    Can someone recommend a site with example code for
    manipulating XML files?
    I've done some of this before in Java and Perl. Does
    ActionScript have similar facilities?

    hsfrey,
    I often put XML files onto the web server and then access
    from Flex code. Something like this:
    protected function load_settings_data():void
    try
    data_URL = "./data_settings.xml";
    data_request = new URLRequest(settings_data_URL);
    data_loader = new URLLoader(settings_data_request);
    data_loader.addEventListener("complete",
    settings_data_loaded);
    data_loader.addEventListener("ioError",
    settings_data_error);
    } // try
    catch (error:Error)
    Alert.show("load_settings_data - error message " +
    error.toString());
    } // catch
    } // load_settings_data
    protected function settings_data_error(e:IOErrorEvent):void
    Alert.show("ioError handled in settings_data_error: error "
    + e.text);
    } // settings_data_error
    protected function settings_data_loaded(event:Event):void
    xml_to_use = XML(data_loader.data);
    // do whatever you want with xml_to_use
    } // settings_data_loaded
    However, while you are developing on the local machine you
    will probably want to have some dummy data in a variable:
    [Bindable]
    protected var data_internal:XML =
    <root>
    <stuff>abc</stuff>
    </root>
    and swap this data in in the catch part of the first
    statement. Obviously the dummy data has to have the right structure
    but you can usually get away with just a few entries rather than
    the whole lot. Once you are happy, forget the local variable, put
    back the error handling and just use the file on your web server
    which can be updated whenever you want independently of the swf
    application.
    Hope that helps,
    Richard

Maybe you are looking for

  • Trying to convert a pdf to an excel file

    whilst trying to convert a pdf file to editteble excel a window popped up saying an error occurred while trying to access the service....

  • Changing Header In each Page - HELP!

    Ok, so i'm typing a paper, MLA, and I need my Last Name and the number of that page in the header, Ex. Jobs 1 etc., so i looked in help and it told me how to do it, except the option "Use Previous Headers and Footers" was checked and gray, meaning i

  • Idoc segments

    hi experts,                can anyone tell me how do we create data elements which we use in segment creation WE31 (t-code) thanks in advance

  • Adding menu items and making system calls in AfterEffects (AE,CS3)

    We are looking to do the following things via javascript in AfterEffects CS3. It does seem straight-forward, but am unable to find a good reference or example. * Add at startup a menu item under "File" (or similar main menu) and have it call a script

  • Format when composing email

    This may be a dumb question but I want to be able to compose my email so that it will print exactly as it looks on screen. I can size the window and print and it looks perfect, but each time I open & close Mail it changes. I looked for tools to forma