ASCII to XML

Hello,
I'm looking to see if there is a way I can convert an ASCII file to XML using PL/SQL?
For example if I have an ascii file like this:
-ID 12345
-AUTHOR test
-SUBJECT testing
Is there a way, I can convert it to:
<ID> 12345</ID>
<AUTHOR>test</AUTHOR>
<SUBJECT>testing</SUBJECT>.
Is it possible using PL/SQL?
Any suggestions/help would greatly be appreciated.
Thanks in advance.

Patrick,
There are no specific features for converting ASCII files into XML, but OWB could be used for this purpose since it does write to file targets. The mapping would read from the ascii file as a source (you could use external tables for this, for example), perform the logic inside the map (wrap data in XML tags, etc.) and then target the output file. You could even use DB tables as XML containers / staging areas.
Regards:
Igor

Similar Messages

  • ASCII to XML conversion

    LS,
    I've been asked to check whether OWB can be used as a conversion tool for ASCII into XML.
    I've found some references of OWB being capable of reading XML sources, but haven't found concrete answers about XML output.
    Is it possible to use OWB to access an ASCII flat file (as an external table for instance) and then map the read data to an XML output file?
    Thanks, Patrick

    Patrick,
    There are no specific features for converting ASCII files into XML, but OWB could be used for this purpose since it does write to file targets. The mapping would read from the ascii file as a source (you could use external tables for this, for example), perform the logic inside the map (wrap data in XML tags, etc.) and then target the output file. You could even use DB tables as XML containers / staging areas.
    Regards:
    Igor

  • Ascii to xml to oracle

    My name is robert and I am a PhD student at UCLA. I am a novice in using XML and Oracle. I would like to know what utilities and/or drivers I need to go from ascii to xml to oracle.
    I am using Oracle 8, Windows 2000 and Ie5. Any suggestions would be greatly appreciated.
    Thanks,
    Robert

    May I know what delimiters are you using? Seems like payload is not UTF-8 encoded and hence SOA is not able to understand the character. Make sure that payload is UTF-8 encoded.
    Regards,
    Anuj

  • Infospoke: variable selection ???

    Hello Experts,
    I know you guys should be getting ready for the Long weekend. But just a small refresher. Thanks in advance.
    I have a infospoke and have to pull data according to yesterdays date. I know I can do this in Infopackage but I cannot figure how to do this in infospoke selection criteria.
    Any suggestions appreciated.

    Hi Sweatha,
    one year ago, a SAP document related to OpenHubService showed in the 'OUTLOOK' page these functions (that is all the enhancements planned for the future):
    - Logical file name handling in order to enable full
      access to the file system of the Application Server
    - Variables used in Selection
    - Additional Data Sources like BEx Query and Hierarchies
    - Additional destination formats like ASCII and XML
    - Remote access to external database tables
    - Transformation Library integration for transformations
    - Deltas available for additional Data Sources
    - Integration with 3rd party tools, i.e. Ascential
    As you can see, there will be also the possibility to use variables in selection...but, at this moment, I think is not possible (I don't know what's your release, but if you have 3.0B, you can only use inclusion and exclusion options).
    For your information,starting from 3.5, it will be possible to have variables within file names (e.g. File<date of creation>),folder as destination, logical file names can be transported and used in the target system without a change, integration of 3rd party ETL tools (e.g., Ascential) and loading data from any source system and distributing data out of BW to any target system.
    Hope this helps.
    Bye,
    Roberto

  • Export List Of Images Selected Along With Some MetaData

    It would be extremely beneficial for LightRoom to have the ability to have an Export feature that creates an ASCII or XML file format (or other common format) of the image file names (and path) that are highlighted/selected. Since LightRoom is a great program that can be used for client previews, this export feature would allow future integration with billing packages to complete the order.
    Ideally the export file would contain the selected image path and file name, and metadata such as cropping size selected (especially if selected from the drop-down selection of crop sizes), keyword tags (and/or folder name), title, rating and label.
    Thank you for your consideration of this feature request.

    I definitely need something similar as well.
    E.g. I have a website with a slideshow functionality in it - it would be really useful to export in a textfile the custom order of the pictures prepared for a new slideshow.

  • Report file name error with Chinese Date format

    Hello,
    I am seeing an error at
    step Write UUT report in the standard model files.  This step is
    calling the API method save on the object Runstate.Report.
    The issue occurs on computers using chinese localization with the date in the report file name.
    Is this a known issue?  Is there a way to modify the filename before calling the above method to eliminate the problem?
    Solved!
    Go to Solution.

    An Error Message is attached. 
    WE have seen this on both Vista and XP.  We are using TestStand version 4.1.1.  I am not sure about the localization, but I have seen this on computers from Taiwan, Korea and Japan.  
    If I put a breakpoint in the Model file at the Write UUT Report Step, you can see Chinese Characters in the time portion of the file name.
    If you change the report name to not include the time and date, the error does not occur.
    We have seen this with ASCII and xml.  With XML, the error also occurs at the step "Add Root Tags to XML Report"
    Attachments:
    FileNameError.JPG ‏134 KB

  • Versioning, Deployment, Execution in OWB 9.2

    For the warehouse created using OWB versions 9.0.3, my company used a versioning tool. All the PLS generated using OWB were moved to Source control system and from there deployed to Target Schema.
    Now in 9.0.4 generated code contains location information that gets replaced by physical location only when code is deployed using OWB. So the old system of versioning and deployment doesnt work. We need to deploy using OWB only. In this case we loose all the versioning of mappings.
    Question 1 :
    Will you please suggest a solution how can we do versioning of our code now ? Versioning is very important for us. In case it is not possible then can we go back to old system of deployment and execution by doing some manual workarounds.
    Question 2 :
    Is it necessary to deploy thru OWB only because of Location factor. In that case if we design such that source and target tables are in the same then these mappings will not contain location information and we should be able to deploy them without using OWB ? What are the other disadvantages of using this approach.
    Question 3 :
    When executing mapping using the template provided by OWB, we need to provide location name and execute it from Runtime Repository owner. I guess, When I deploy outside OWB I will not be able to use this method of execution. Default parameters and custome parameters of the mapping are stored in run time repository under the location name at the time of deployment . This information is accessed by the template to execute mapping. ( is it true ??)
    We are not going to use multiple physical configuration for the same mapping, so if we deploy not using owb, can we execute directly in Target schema, without using template. How can we provide the input parameter to Main function in this case ?
    Question 4 :
    Will we be able to get Audit information if we do not use OWB's recommended way of deployment and execution.
    Vibha

    Vibha,
    Question 1:
    What you can do, is store the entire deployment script using the deploy to file option and version control that file. The format will be an ASCII-based XML file that versions exactly the same as you would version the files that OWB generated in previous releases.
    Also, you may be interested in the version control you can do inside of OWB. That is, as of 9.0.4 we enable you to create snapshots of your design, which you could compare and restore at any point in the future. In 9.0.4, we provided a beta UI on top of this feature (scripting would be the other way to go), but in 9.2 we provide a production quality UI. To enable the UI in 9.0.4, close the product, locate preference.properties in <owb home>\owb\bin\admin and change the setting for MCMUIEnabled from false to true. Please do consider migrating to OWB92...
    Question 2:
    The locations were also introduced to support multi deployment (e.g. development, test, production) with potentially different physical setups of the machines, but no design changes necessary. Also, execution uses the location concepts. Did you already read http://otn.oracle.com/products/warehouse/pdf/OWB_RuntimeChanges.pdf, which contains more information about the changes and why these are there?
    Question 3:
    To execute directly from the database, I recommend you download http://otn.oracle.com/sample_code/products/warehouse/files/run_my_owb_stuff.sql and use that as the basis for your execution. The entire architecture changed from 9.0.3 to 9.0.4... and the runtime platform now manages the execution. Via the script above you get a wrapper around the script that OWB provides out of the box (minimum version 9.0.4.10).
    Question 4:
    The generated code contains all the calls to log the audits, so in principle yes. Having said that, if you do not deploy through OWB... it will be difficult to get the correct references that OWB will use during its logging to be resolved. I hope that with the explanation above you will be able to deploy and run inside the OWB context and make the entire environment work for you.
    Thanks,
    Mark.

  • PleaseHELP!: pass value asp to xfdf, open pdf form prepopulated

    Hi - we're Using Acrobat/Designer 7.0.  Please help..<br /><br />Still working on the passing value from ASP to pdf form.  <br /><br />What I have so far, based on helpful info from this forum, is the following code {see below}  <br /><br />This code prompts to save, then opens the asp page with the value "0000000000000000" as text. <br /><br />My hope is to pass the value and open the pdf form w/o prompting, & to have the identifier field prepopulated.<br /><br />I've tried this with a pdf and xdp form, neither works. What am i doing wrong?  Samples are most welcome. This is rather urgent, as I want to avoid manually creating 100s of pre-populated pdf forms for e-mail.<br /><br />Thanks much, ginger<br /><br />'======================================================================<br /><%@ LANGUAGE = VBScript%><br /><% Response.ContentType = "application/vnd.xdp+xml" %> <br /><br /><?xml version="1.0" encoding="utf-8"?><br /><?xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"<br /><?xfa generator="XFA2_0" APIVersion="2.2.4333.0"?><br /><xdp:xdp xmlns:xdp="Http://ns.adobe.com/xdp/"><br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><br /><xfa:data><br /><fields><br />     <field name="Identifier"<br />          <value>0000000000000000</value><br />     </field><br /></fields><br /><br /><f href="http://localroot/test/applicantform.xdp"><br /><br /></xfa:data><br /></xfa:datasets><br /></xfdf><br /></xdp:xdp>

    I am working on this same problem too and after playing with the code above, I found *a solution*.  I am not sure it is exactly what you want to do but it works nonetheless.  It does not prompt the user to download the document because I took out the Content-Disposition header.<br /><br />This is just some proof of concept code in C#:<br /><br />protected void Page_Load(object sender, EventArgs e) {<br />     string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xfdf xmlns=\"http://ns.adobe.com/xfdf/\" xml:space=\"preserve\"><f href=\"http://SERVERNAMEHERE/TestPDF.pdf\"/><fields><field name=\"CompanyName\"><value>It Worked!</value></field></fields></xfdf>";<br /><br />     Response.Clear();<br />     Response.ContentType = "application/x-pdf";<br />     Response.AddHeader("Content-Type", "application/vnd.adobe.xfdf");<br />     System.Text.ASCIIEncoding ascii = new System.Text.ASCIIEncoding();<br />     Response.AddHeader("Content-Header", xml.Length.ToString());<br />     Response.BinaryWrite(ascii.GetBytes(xml));<br />     Response.End();<br />}<br /><br />If I run that code, it does actually work and puts "It Worked!" in a form field I named CompanyName in the test PDF document I created.  From playing with it, it does look like you have to pass it the full URL to your source PDF document -- at least I couldn't get it to work if I just entered the PDF document name and not the full URL (even though the PDF was in the same directory as my page).<br /><br />Hope this helps somebody.

  • Illustrator: Balken- und Liniengrafiken programmieren

    Hallo
    Ich möchte ein Plug-In programmieren, in dem Daten eingelesen (ASCII-Datei, XML) werden und dem Anwender die Möglichkeit gegeben wird, in einem Dialog einige Einstellungen vorzunehmen. Danach sollen die Daten in einer Balken- oder Liniengrafik dargestellt werden.
    Ist das im Adobe Illustrator möglich?
    Ist es möglich, mit dem SDK vom Illustrator 10.0 Balken- und Liniengrafiken zu programmieren?
    Wenn ja, in welcher Suite finde ich die Methoden dazu?
    Vielen Dank für die Info
    Hans

    Mit so einem zurechtgeschnipselten Screenshot kann keiner wirklich was anfangen. Da muss man schon mal "the big picture" haben. Außerdem dazu Screenshots von der Ebenen Palette und dem Appearance Panel. Vielleicht mußt du einfach nur ein paar Dinge anders anordnen/ den Grafikstil anpassen. Ansonsten könnte das natürlich was sein, was sich nur durch Umwandeln des Diagramms in echte separate Objekte und entsprechendes Umstapeln beheben läßt....
    Mylenium

  • Difference between BW7.0 and BI7.3

    Hi all,
    1.Whats is the difference between bw 7.0 and BI 7.3?
    2. we are using BI 7.3 , have to know that is there any limitations of using BI 7.3 . We are extracting the data from multiprovider to Open hub Destination? Is there any disadvantage ?
    Please gudie me on this...

    Hi,
    Some of the features of 7.3:
    Major Step on enterprise Data warehousing scalability and flexibility
    BW accelerator: SAddditional performance
    Integration improvements with SAP Business Objects Data Services.
    Open Hub Services:
    1) Info spoke functions have been removed the infospoke and open hub monitor functions previously located under Tools-Open hub services. These functions are now obsolete due to the introduction of open hub destination.
    2) One can now extract data in ASCII and XML when using a file as a destination. You can now select either the default setting or direct input as the codepage setting.
    3)It is no longer possible to create new Infospokes.One can still use, display and change or delete existing Infospokes.It is recommended switching to the new Open hub destination concept.With the data transfer process and transformation, the Open hub destinationprovides all of the functions offered by Infospokes and thus replace the Infospoke concept.
    Please find some of the links which may be helpful for you.
    <link farm removed by moderator>
    Regards,
    PRS
    Edited by: Siegfried Szameitat on Sep 28, 2011 9:38 AM

  • How to remove non-ASCII charcters from an XML generated using Simple Transf

    Hi,
    I am currently facing a problem where I invoke a ST like
    CALL TRANSFORMATION ZTEST
      source root = str
      result xml rawstr.
    to prepare an XML using the contents of the ABAP variable str.
    In my case sometime the variable str can contain non-ASCII characters. What I find is that ST do not remove these characters and the final XML that get generated thus contains non-parsable xml charcaters.
    Is there an efficient way to remove/replace such non-ascii characters within the ST such that my final XML is consumable by any xml parser. I do not want to do a second level of processing by running through the output xml and removing the charcaters individually, because in our system the number of xml messages generated is very high and any such lookup-replace algorithm terms out to be too coslty.
    Regards,
    Vikas Lamba

    Hi
    may be you know this syntax :)
    <?xdofx:substr(SHIP_TO_LOCATION_NAME,11,44)?>
    Rahul

  • ?xml version = '1.0' encoding = 'ASCII'? pl/sql xml parser

    When ever I parse a document which has the
    <?xml version = '1.0' encoding = 'ASCII'?> tag as the first line hangs the pl/sql xml parser . If I remove the "encoding = 'ASCII'" from the file everything works fine ! What is the problem ?
    version 8.1.6 / plsql parser v2 / hpux 11x
    Here is the input file
    <?xml version = '1.0' encoding = 'ASCII'?>
    !--- This is a comment -->
    <person>
    <employee>
    <lastname>GHANTASALA</lastname>
    <firstname>SREE</firstname>
    <age>32</age>
    </employee>
    <employee>
    <lastname>TAMATAM</lastname>
    <firstname>SATISH</firstname>
    <age>30</age>
    </employee>
    </person>
    Here is my program
    declare
    p xmlparser.parser;
    doc xmldom.DOMDocument;
    dir varchar2(100) := '/apps/oracle/drugstore';
    errfile varchar2(30) := 'err.txt' ;
    inpfile varchar2(30) := 'person.xml';
    nl xmldom.DOMNodeList;
    len number;
    n xmldom.DOMNode;
    new_node xmldom.DOMNode;
    node_name varchar2(100);
    node_value varchar2(100);
    begin
    -- new parser
    p := xmlparser.newParser;
    -- Set some characteristics
    xmlparser.setValidationMode(p, FALSE);
    xmlparser.setErrorLog(p, dir&#0124; &#0124;'/'&#0124; &#0124; errfile );
    xmlparser.setBaseDir(p, dir);
    -- parse input file
    xmlparser.parse(p, dir&#0124; &#0124;'/'&#0124; &#0124;inpfile);
    -- get document
    doc := xmlparser.getDocument(p);
    -- get all elements
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    dbms_output.put_line('Length='&#0124; &#0124;len);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmldom.item(nl, i);
    node_name := xmldom.getNodeName(n);
    -- get the text node associated with the element node
    n := xmldom.getFirstChild(n);
    if xmldom.getNodeType(n) = xmldom.TEXT_NODE then
    node_value := xmldom.getNodeValue(n);
    if node_name='lastname' then
    dbms_output.put_line('The value you are looking for is -->:'&#0124; &#0124;node_value);
    if node_value = 'GHANTASALA' then
    xmldom.setNodeValue(n,'TEST2');
    end if;
    end if;
    end if;
    end loop;
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    end ;
    null

    The encoding header is actually generated by
    by the following piece of code in my pl/sql program .
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    Since this is a document created by the pl/sql parser, I assume there is some meaning to it !
    Also why is it hanging ? PL/sql parser should tell me that it is not a valid string !

  • Display extended ascii characters as question mark in xml file

    I am creating a XML file with encoding as UTF-8. Some tag values contain some extended ascii characters. When i run the java program to create the file in windows, the extended ascii characters are display correctly. But in linux it is displaying as ?(question mark).
    i am not able to rectify this. can anyone help me....
    Its urgent
    Thanks in advance.
    Message was edited by:
    Rosy_Thomas@Java

    Probably the locale is not set for the shell you are running in. The default 'C' locale uses the ASCII encoding which defines only 128 characters. See if giving the commandexport LC_CTYPE=en_US.UTF-8before starting the program fixes the issue.

  • ASCII control characters in XML

    hi,guys
    I want to export InDesign content to an XML file using javascript.
    The problem is, except for TAB, LF, and CR the control characters (those below ASCII 32) are not allowed in well-formed XML and any parser worth its salt will puke.
    Adobe (mis)uses some ASCII control characters for their own purposes; e.g. "End nested format here" becomes ASCII 3 (ETX - end of text).
    Now how can i export the well-formed XML?
    Although i can replace these characters, but i don't know what should i replace it to correctly, and can be used it correctly in my web page.

    You know there is an Indesign Scripting Forum, too?
    http://forums.adobe.com/community/indesign/indesign_scripting

  • Captivate 8 - ETX ASCII code in XML export - error

    Hi,
    When I create an XML Export from a course (Captivate 8)  and open the XML in Notepad ++, I see following strange ASCII-code (See the screenshot below).
    When I take a look at the text in my Captivate file. The text is properly formatted in the text caption. There are also no strange characters in the entire captivate file.
    The text in my Captivate file is clean (copied without any formatting or manually typed).
    So the ASCII code must me added while exporting to XML.
    I know that I can remove those ASCII signs with the find and replace function, but I would like to know the reason Captivate adds those code at the end of some text.
    All help is appreciated.
    Regards,
    W

    Hi,
    When I create an XML Export from a course (Captivate 8)  and open the XML in Notepad ++, I see following strange ASCII-code (See the screenshot below).
    When I take a look at the text in my Captivate file. The text is properly formatted in the text caption. There are also no strange characters in the entire captivate file.
    The text in my Captivate file is clean (copied without any formatting or manually typed).
    So the ASCII code must me added while exporting to XML.
    I know that I can remove those ASCII signs with the find and replace function, but I would like to know the reason Captivate adds those code at the end of some text.
    All help is appreciated.
    Regards,
    W

Maybe you are looking for

  • No longer able to add files or folders to itunes

    After updating to 12 i can no longer add music files or folder to my itunes music library, the procedure i used in the past was :file>add folder library: now when i follow this and click on the file or folder i want to add to my library nothing at al

  • Right click is not working on oracle form

    Hi I created a custom form using template.fmb When user trying to pasted some data into text field and right clikc the mouse , the popup menu is not coming. Actually nothing is happening when right click the mouse. Please help me on this one and let

  • Are the notes from my iPhone available on my mac?

    I recently upgraded to an iPhone 6, but when i restored from backup (synced my old phone and restored from iTunes), only NEW notes from the past 4 weeks showed up.  I really need to recover these notes!

  • Why do I get an "untrusted connection" message when trying to access Google?

    This seems to happen a few times a week. Usually, I'm trying to do a search, and then no Google sites will work - mail, maps, whatever. I have a Mac, my time zone is correct, and I never add an exception because I don't understand why Google of all s

  • Problem doing lookup

    Hi, I used pramati studio 3.0 and JBoss 3.0.4 PROBLEM: i am not able to do a look up on the beans running on the server. SITUATION:: I have written a session bean which communicates with an entity bean. I deployed them on JBoss 3.0.4 and they were su