PLSQL changing XML file content

Hello Experts,
I have a task to do.
I have to replace special characters from an XML file placed on the server through PLSQL.
So that i created a plsql procedure.
PROCEDURE REMOVE_SPECIAL_CHARS (p_file_name IN VARCHAR2)
AS
l_tmp_clob       CLOB                             DEFAULT EMPTY_CLOB();
l_bfile          BFILE NULL;
l_dest_offset    INTEGER            := 1;
l_src_offset     INTEGER            := 1;
l_outfile        UTL_FILE.file_type;
lang_ctx         NUMBER             := DBMS_LOB.default_lang_ctx;
warning          NUMBER NULL;
l_dest_file      VARCHAR2(300) NULL;
BEGIN
mob_util_pck.log_write ('I','Inside REMOVE_SPECIAL_CHARS procedure(+)');
l_dest_file:=SUBSTR (p_file_name, (INSTR (p_file_name, '/', -1, 1))+1);
mob_util_pck.log_write ('I','Following File will be modified: '||l_dest_file);  
   l_bfile := BFILENAME ('MOBSEPAOUT', l_dest_file);
   DBMS_LOB.OPEN (l_bfile, DBMS_LOB.file_readonly);
   DBMS_LOB.createtemporary (l_tmp_clob, TRUE);
   DBMS_LOB.loadclobfromfile (dest_lob          => l_tmp_clob
                            , src_bfile         => l_bfile
                            , amount            => DBMS_LOB.getlength (l_bfile)
                            , dest_offset       => l_dest_offset
                            , src_offset        => l_src_offset
                            , bfile_csid        => DBMS_LOB.default_csid
                            , lang_context      => lang_ctx
                            , warning           => warning
   DBMS_LOB.CLOSE (l_bfile);
mob_util_pck.log_write ('I','Deleting Old File');
   BEGIN
      mob_util_pck.delete_files ('MOBSEPAOUT'
                               , l_dest_file
   END;
mob_util_pck.log_write ('I','Before Replacing Characters');
   l_tmp_clob := REPLACE (l_tmp_clob, '€', 'E');
   l_tmp_clob := REPLACE (l_tmp_clob, '@', '(at)');
   l_tmp_clob := REPLACE (l_tmp_clob, '&', '+');
   l_tmp_clob := REPLACE (l_tmp_clob, 'à', 'a');
   l_tmp_clob := REPLACE (l_tmp_clob, 'é', 'e');
   l_tmp_clob := REPLACE (l_tmp_clob, 'è', 'e');
   l_tmp_clob := REPLACE (l_tmp_clob, 'ç', 'c');
   l_tmp_clob := REPLACE (l_tmp_clob, 'ù', 'u');
   l_tmp_clob := REPLACE (l_tmp_clob, 'ï', 'i');
   l_tmp_clob := REPLACE (l_tmp_clob, 'ù', 'u');
   l_tmp_clob := REPLACE (l_tmp_clob, '[', '(');
   l_tmp_clob := REPLACE (l_tmp_clob, ']', ')');
   l_tmp_clob := REPLACE (l_tmp_clob, '\', '/');
   l_tmp_clob := REPLACE (l_tmp_clob, '^', '.');
   l_tmp_clob := REPLACE (l_tmp_clob, 'ù', 'u');
   --l_tmp_clob := REPLACE (l_tmp_clob, '_', '-');
   l_tmp_clob := REPLACE (l_tmp_clob, '`', '''');
   l_tmp_clob := REPLACE (l_tmp_clob, '{', '(');
   l_tmp_clob := REPLACE (l_tmp_clob, '|', '/');
   l_tmp_clob := REPLACE (l_tmp_clob, '}', ')');
   l_tmp_clob := REPLACE (l_tmp_clob, '~', '-');
   l_tmp_clob := REPLACE (l_tmp_clob, 'À', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Á', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Â', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ã', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ä', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Å', 'A');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ç', 'C');
   l_tmp_clob := REPLACE (l_tmp_clob, 'È', 'E');
   l_tmp_clob := REPLACE (l_tmp_clob, 'É', 'E');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ê', 'E');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ë', 'E');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ì', 'I');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Í', 'I');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Î', 'I');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ï', 'I');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ñ', 'N');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ò', 'O');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ó', 'O');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ô', 'O');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Õ', 'O');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ö', 'O');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ù', 'U');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ú', 'U');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Û', 'U');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ü', 'U');
   l_tmp_clob := REPLACE (l_tmp_clob, 'Ý', 'Y');
   mob_util_pck.log_write ('I','After Replacing Special Characters');
   mob_util_pck.log_write ('I','Before Creating New File '||l_dest_file);
   DBMS_XSLPROCESSOR.clob2file(l_tmp_clob, 'MOBSEPAOUT', l_dest_file);
   mob_util_pck.log_write ('I','After Creating New File '||l_dest_file);
   mob_util_pck.log_write ('I','Inside REMOVE_SPECIAL_CHARS procedure(-)');
END REMOVE_SPECIAL_CHARS;
This procedure is working fine for some special characters. But some special characters are getting replaced by different characters before performing the replace so it is causing wrong replacement of characters.
eg- i need to replace & by +
but it is changing it to +amp which is incorrect.
Is it something related to characters encoding?
Please help.
Regards-
Vikrant

eg- i need to replace & by +
but it is changing it to +amp which is incorrect.
Is it something related to characters encoding?
Due to its special meaning in the XML language, occurrences of the ampersand character '&' have be escaped to &amp; as well as '<', '>' and '"' respectively to &lt;, &gt; and &quot;.
So in short, do not replace the ampersand character.

Similar Messages

  • How to insert External XML file content into XMLTYPE through Pro*c

    Could any one sugest me how to insert a external XML file content into Db
    into XMLTYPE datatype through Pro*c program.
    Thanks for any help...... who has done this
    Ghanta Tagore

    Hi
    After some good fight of 3 days, I have done it through Pro*c
    This is the way to handle this
    Buffer-->Temporary Clob-->XMLTYPE(using CreateXml)
    Pasting my piece o code to do this
    ===============
    OCIClobLocator *license_txt;
    varchar h_ttt[1024] = {'\0'};
    ub4 amt;
    int i;
    EXEC SQL ALLOCATE :license_txt;
    EXEC SQL LOB CREATE TEMPORARY :license_txt ;
    GetName(name); /*Gets Name to insert into name column in License Table*/
    for(i=0; i<4;i++)
    GetXMLL((char *)h_ttt.arr); /*Gets a string value of XML into this example*/
    /*<Tagore>Is From TCS Delhi</Tagore>*/
    /*This can be changed to get buffer from FILE */
    h_ttt.len = strlen((char *)h_ttt.arr);
    amt = sizeof(char) * h_ttt.len ;
    EXEC SQL LOB WRITE APPEND :amt FROM :h_ttt INTO :license_txt;
    EXEC SQL
    INSERT INTO license_table VALUES (:sss, :name, sys.xmltype.createXML(:license_txt))
    ================
    Thanks For ur Help
    Tagore Ghanta

  • How can I transfer a XML file content to a MS SQL database by stored procedure using LabWindows/CVI SQL Toolkit?

    Hi,
    I have a problem to transfer a XML file content to a MS SQL database by a given/fixed stored procedure. I'm able to transfer the content of the file by using following method ...
    hstmt = DBPrepareSQL (hdbc, EXEC usp_InsertReport '<Report> ..... </Report>');
    resCode = DBExecutePreparedSQL (hstmt);
    resCode = DBClosePreparedSQL (hstmt);
    ... but in this case I'm not able to fetch the return value of the stored procedure! 
    I have tried to follow the example of the stored procedure in the help documentation (DBPrepareSQL) but I miss a datatype for xml?!?
    Any idea how to solve my problem?
    KR Cake  
    Solved!
    Go to Solution.

    After some additional trials I found a solution by calling the stored procedure in this way
    DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBPrepareSQL (hdbc, "usp_InsertReport");
    DBCreateParamInt (hstmt, "", DB_PARAM_RETURN_VALUE, -1);
    DBCreateParamChar (hstmt, "XMLCONTENT", DB_PARAM_INPUT, sz_Buffer, (int) strlen(sz_Buffer) + 1 );
    DBExecutePreparedSQL (hstmt);
    DBClosePreparedSQL (hstmt);
    DBGetParamInt (hstmt, 1, &s32_TestId);
    where sz_Buffer is my xml file content and s32_TestID the return value of the stored procdure (usp_InsertReport(@XMLCONTENT XML))
    Now I face the problem, that DBCreateParamChar limits the buffer size to 8000 Bytes.
    Any idea to by-pass this shortage??

  • Updating flash from a dynamically changing XML file

    Creating a non-interactive status display: I want to have the
    flash display reflect data in a server-based XML-file. So far this
    is easy. But I want the display to change everytime the XML file
    changes-- in order to reflect status changes. I've used an
    XMLConnector and specified it and the trigger in the first frame.
    The Flash code catches and shows the XML values initially . But
    when I edit the XML file, the new values are never picked up by
    Flash- its almost as though the values are cached. How do I get
    Flash to regularly be updated from a changing XML file? I've also
    tried putting the trigger in a loop- but that doesn't work
    either.

    I DID find a solution with setInterval, but there is still a
    problem of a diffeent sort.
    When using XMLConnector, it appears that
    XMLConnector.trigger() is the thing that goes out and gets new data
    from the server. so:
    function checkForData():Void {
    myXML.trigger();
    <<handle new values of bound data>>
    var intervalID:Number = setInterval(checkForData, 10000);
    works very well by executing the trigger every 10000
    timeunits. This all works when run in the Flash Player. However, if
    I embed the thing in a webpage (with either FireFox or IE7 or 6),
    It stops triggering after the first time. Interestingly if I also
    run the Flash Player version, then the web version keeps updating,
    but stops if I kill the Player. So, I'm wondering: whats up with
    this?

  • Streaming XML file content to a HTTPS servlet..

    Hi,
    I want to stream the contents of a XML file , which I have generated through XDK for PL/SQL, to a HTTPS address for a servlet.
    This HTTPS connections uses certifcates for user authentication. I have the certifcate on my local machine. Is there anyway of doing this through PL/SQL? Are there any packages available in Oracle 8.1.6 for this purpose? Can somebody tell me if there is a better way of doing this?
    Any help will be greatly appreciated.
    Thanks.

    After some additional trials I found a solution by calling the stored procedure in this way
    DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBPrepareSQL (hdbc, "usp_InsertReport");
    DBCreateParamInt (hstmt, "", DB_PARAM_RETURN_VALUE, -1);
    DBCreateParamChar (hstmt, "XMLCONTENT", DB_PARAM_INPUT, sz_Buffer, (int) strlen(sz_Buffer) + 1 );
    DBExecutePreparedSQL (hstmt);
    DBClosePreparedSQL (hstmt);
    DBGetParamInt (hstmt, 1, &s32_TestId);
    where sz_Buffer is my xml file content and s32_TestID the return value of the stored procdure (usp_InsertReport(@XMLCONTENT XML))
    Now I face the problem, that DBCreateParamChar limits the buffer size to 8000 Bytes.
    Any idea to by-pass this shortage??

  • EC SALES LIST - Belgique: XML file: Content not accepted in prolog

    Hy tou you all,
    We've implemented all Ec sales list note oss for Belgium but at the upload in the delcaration vat system the xml file is not accepted : "Content not accepte in prolog"; Did this message encured to you ?
    Thanks,
    TF

    HI,
    I hope you are asking about below legal changes
    http://www.minfin.fgov.be/portail2/fr/e-services/intervat/calendrier.html
    and SAP DS colleagues are working on same and they are planning to release the note
    within soon.
    For same information will check the service market place.
    Thank you.
    Regards
    Madhu M

  • Display an XML file Content as a treeView in a SharePoint 2013 custom form edited with SharePoint Designer 2013

    Hello everyone,
    Within a list form, user has to select a value amongst a huge number of availables options.
    Instead of using something like a dropdown list, which would be very boring to parse, I would like to display possibles values in a treeview.
    To do that, I tried to use an <Sharepoint:SPTreeView bind to a SharePoint:SPXmlDataSource who read data from an XML File.
    <SharePoint:SPXmlDataSource runat="server" DataFile="../../SiteAssets/App_Data/myfile.xml" AutoSave="True" XPath="" ID="myDataXml"></SharePoint:SPXmlDataSource>
    <SharePoint:SPTreeView runat="server" ID="MyTreeView" DataSourceID="myDataXml" />
    But when I try to display the form in my web browser, an error occurs.
    Therefore, my question is : Is it possible to display the content of an Xml file as a treeView in a SharePoint 2013 custom form edited with SharePoint Designer 2013 ?
    If the answer is yes, how ? Which are the required properties for "SharePoint:SPXmlDataSource" tag and "SharePoint:SPTreeView"  tag ?
    What are the requirements to use thoses tags ?
    Regards,
    Florian.
    Ps : I dont have access to the server side of the SharePoint site I am working on.

    Assuming that https://fullsitename is a new URL address did you make sure to update your browser to include it in the Trusted Sites zone?  The message you are quoting is exactly the one you get if you don't have it in Trusted Sites.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Changing XML file

    All,
    I am very new to OA Framework and this is my assignment in OA Framework to customize a page.
    Basically i have to modiy a query of an LOV.
    The query is in an XML file i.e ExpenseTemplatesVO.xml
    I have two questions :
    1) Steps on how to modify this query. Can i simply change this query and copy back the XML file.
    2) I need to get Responsiblity id in this query. How can i get this?
    Any help is greatly appreciated.
    Thanks

    1) Steps on how to modify this query. Can i simply change this query and copy back the XML file.If you are planning to add whereClause then you can go for Controller extension. We never change the seeded oracle files. We always extend these classes so to retain the existing functionality.
    And if you want to add one attribute in the VO query then you have to go for View Object Substitution. You can find N number of links on Google and also search in Old thraeds.
    2) I need to get Responsiblity id in this query. How can i get this?It can be capture by using the below syntax in the extended controller:
    String respId = pageContext.getResponsibilityId();
    String respName = pageContext.getResponsibilityName();
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Searching for BLOB xml file content

    Hi Gurus,
    I am having a table with a blob type column which is holding xml files. Is there a way to select records of the table based on specific words contained in the xml?
    Many Thanks,
    Napster

    rp0428 wrote:
    But if OP really wants to search the 'content' of the xml elements I don't see that working for them.
    Sure, he can.  All you have to do is add auto_section_group to the index parameters, then you can search within any of the specific tags, as demonstrated below.
    SCOTT@orcl12c> CREATE TABLE a_table
      2    (id          NUMBER,
      3      blob_type_column  BLOB)
      4  /
    Table created.
    SCOTT@orcl12c> INSERT INTO a_table VALUES (1,
      2  UTL_RAW.CAST_TO_RAW (
      3  '<a><b>something different</b><c>whatever you are looking for</c></a>'))
      4  /
    1 row created.
    SCOTT@orcl12c> INSERT INTO a_table VALUES (2,
      2  UTL_RAW.CAST_TO_RAW (
      3  '<a><b>something else</b><c>something different</c></a>'))
      4  /
    1 row created.
    SCOTT@orcl12c> CREATE INDEX test_index ON a_table (blob_type_column)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS ('SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
      4  /
    Index created.
    SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
      2  FROM   a_table
      3  WHERE  CONTAINS
      4            (blob_type_column,
      5             '(whatever AND looking) WITHIN c') > 0
      6  /
            ID
    UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
             1
    <a><b>something different</b><c>whatever you are looking for</c></a>
    1 row selected.
    SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
      2  FROM   a_table
      3  WHERE  CONTAINS
      4            (blob_type_column,
      5             '(something different) WITHIN b') > 0
      6  /
            ID
    UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
             1
    <a><b>something different</b><c>whatever you are looking for</c></a>
    1 row selected.
    SCOTT@orcl12c> SELECT id, UTL_RAW.CAST_TO_VARCHAR2 (blob_type_column)
      2  FROM   a_table
      3  WHERE  CONTAINS
      4            (blob_type_column,
      5             '(something different) WITHIN c') > 0
      6  /
            ID
    UTL_RAW.CAST_TO_VARCHAR2(BLOB_TYPE_COLUMN)
             2
    <a><b>something else</b><c>something different</c></a>
    1 row selected.

  • Can't change xml file

    I am trying to import files from an external drive. I was able to do the add file to library from the drive but whenever I reload itunes it expects the files to be on my external drive which I have removed. I tried to change the location of the files in the itunes music library xml file but everytime I bring up itunes it changes the file location back to the original file on the external hard drive. I physically copied the files from the external drive to my itunes directory but itunes refuses to let me manually change the xml file to reflect the new location. Does anyone have a clue as to how I can update the xml file to point to the itunes directory for these imported songs rather than pointing back to the external drive?

    Bart_Blommaerts wrote:
    2: I set the "&#235 ;" value myself ..The problem setting this value in your Java code is that ... &#235; cannot be used to escape anything in Java, it only can be used to escape characters in an XML file.
    This is why an XML parser will automatically translate this value for you when it parses the XML file. The dom4j Document object will never see this value and when you do a getText() the resolved value is returned.
    Instead in Java you should use either the '�' value (make sure to save your Java files as Unicode) or you could use the Java way to escape characters: \u00EB.
    I was satisfied with the "�" in my XML file ... but when I deployed the application to the webserver .. and generated an XML-file I read "��", which is definitely not what I want ..
    So on my local Tomcat5 server I get "�". On the SunWappserver I get "��".This seems to be a different problem. When you read the file, you will have to make sure to read the file with the encoding that it was saved in. This means that the editor that you use to read the file will have to be able to read files encoded using UTF-8 (Unicode).

  • How to display an xml file contents in jsp as tree view

    hi,
    Iam trying to read an xml file and display the structure in jsp as tree view, can any one help me

    Use a [XML or DOM parser|http://java-source.net/open-source/xml-parsers] to read a XML file into a tree structure of Java objects.
    Use the [Collections API|http://java.sun.com/docs/books/tutorial/collections/index.html] to get hold of the relevant elements in a tree structure.
    Use JSTL´s [c:forEach|http://java.sun.com/javaee/5/docs/tutorial/doc/bnakh.html] tag to iterate over a Collection in JSP.
    Use HTML´s [<ul>/<li>|http://www.w3.org/TR/REC-html40/struct/lists.html#h-10.2] or [<dl>/<dt>/<dd>|http://www.w3.org/TR/REC-html40/struct/lists.html#h-10.3] tags to represent a tree in HTML.

  • How to change property file contents during run time?

    Hi everyone. First post so go easy on me please.
    I have a couple of properties that I want to read from a from a file. To achieve this I simply use:
    ResourceBundle.getBundle("my.package.MyItems").getString("MyProperty");
    This works like a wonder. The problem is, i want to change the property "MyProperty" during runtime. I've found the properties file (MyItems.properties) inside weblogic, but if a change its contents it does not reflect in the application.
    I can come up with a couple of justifications:
    * I'm not looking in the right folder/changing the wrong file in the server;
    * Weblogic caches the properties file, meaning that I have to redeploy the project (defeating the purpose of actually having a properties file).
    Can anyone help with this one?
    [EDIT] Forgot important info:
    * JDeveloper 11.1.1.4
    * Weblogic 11.3 (not 100% sure)
    * Both JDev and WebLogic running on Windows 7 64 bits
    Thank you in advance!
    Best Regards
    J. Peixoto
    Edited by: 868634 on Jul 12, 2011 9:37 AM
    Edited by: 868634 on Jul 12, 2011 10:21 AM
    JDeveloper 11.1.1.4, not 3

    I tried it all.
    Just an explanation of my context.
    I have 1 application with 2 projects in it. First project is called "CommonUI_ViewController" and the second one "FO_ViewController".
    The properties file I'm trying to change is located inside "CommonUI_ViewController", in package "PropertiesConfig" and the file is called "PhaseListener.properties".
    "FO_ViewController" is dependent on "CommonUI_ViewController". When I run "FO_ViewController" the integrated weblogic server log shows this (among other things):
    [10:25:55 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war
    [10:25:57 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war
    Note: both lines above point to folders. "FO_ViewControllerWebApp.war" and "CommonUI_ViewControllerWebApp.war" are NOT war files, but folders that have that name.
    I tried changing the properties file in the following locations:
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\classes\PropertiesConfig\PhaseListener.properties (no need to open any jar/war to get to this one).
    I changed all these files with different values but no change was shown in the application (using the method in the previous post).
    I believe that I'm still doing something wrong :/
    Thank you for your help so far vinod_t_krishnan!
    J. Peixoto

  • CSS isn't changing XML File

    I'm working on the example attached trying to get my css to alter the colour of my xml links. Despite doing what the forums say you should it's not working. What am I doing wrong? Thanks
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/css" href="style.css"?>

    I assume I put this code at the bottom of my current AS?
    When I run the fla I get the following message:
    Error opening URL "file:///C|/Documents%20and%20Settings/Jen/Desktop/xml/undefined"
    It still displays my xml info but there is no colour change. This is how my current AS is looking:- Thanks
    function loadXML(loaded) {
    if (loaded) {
    _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
    _root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
    name_txt.text = _root.inventor;
    comment_txt.htmlText = _root.comments;
    } else {
      trace("file not loaded!");
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("inventors.xml");
    var myCSS = new TextField.StyleSheet();
    myCSS.load(style.css);
    // define onLoad handler
    myCSS.onLoad = function(success) {
        if (success) {
            name_txt.styleSheet = myCSS; // where myTextField_txt is your textfield's instance name
            // call a funciton to assign your text to myTextField_txt
        } else {
            name_txt.text = "CSS file failed to load!";

  • FTP to Read content of Text/xml file

    Hi,
    I need a help for reading content of text/xml file through FTP. Below I just am explaining the scenario.
    Our application server is in UNIX. Now we have to run a report program to access in to a FTP server which is in windows platform. Using FTP_CONNECT, FTP_COMMAND, FTP_DISCONNECT we are able to connect to FTP server and also able to copy files from FTP server to SAP application server. After copied in application server, we are able to read the content of the txt file in to internal table in ABAP program using OPEN DATASET. But our requirement is that we want to read the text or xml file content into internal table while accessing into FTP server from SAP application instead of after copying the file into application server.
    So please help me to solve my problem.
    -Pk

    Thank you Bala,
    But can you help me what should I pass against FNAME and CHARACTER_MODE Import parameter? Should I pass the full path of the file with name or only I have to pass file name ? For example if my text file name in FTP Server is test.txt and the IP of the ftp server is 10.10.2.3 then should I pass the value against FNAME as '
    10.10.2.3\xyz\text.txt' ? Here xyz is the name of the directory in C drive where test.txt is exist.
    Please help me.
    -pk

  • Xml file parse  event base

    hello all,
    i am learning xml file with sap help sample. I have a FM, that change xml-file into if_ixml_parser, but when i wrote the xml " <person status="retired">Walt Whitman</person>" and debug it.
    event_sub was 312, <b>event was always initial</b>.
    data: event     type ref to if_ixml_event,
            event_sub type i.
    let the parser know which events I am interested in
    event_sub = if_ixml_event=>co_event_element_pre2 +
                if_ixml_event=>co_event_element_post.
    parser->set_event_subscription( events = event_sub ).
    do.
      event = parser->parse_event( ).
      if event is initial.
        exit. ' either end reached or error (check below)
      endif.
      data: str type string.
      case event->get_type( ).
        when if_ixml_event~co_event_element_pre2.
          str = event->get_name( ).
          write: '<' str '>'.
        when if_ixml_event~co_event_text_post.
          str = event->get_value( ).
          write: str.
      endcase.
    enddo.
    Thanks for Request.
    <a href="http://help.sap.com/saphelp_nwmobile71/helpdata/de/47/b5413acdb62f70e10000000a114084/frameset.htm">sap library - Parsing an XML document event-based</a>
    Best regards
    Shuo

    Hi,
         reference link:
    http://help.sap.com/saphelp_nw04/helpdata/en/fd/9d7348389211d596a200a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/576670dca511d4990b00508b6b8b11/content.htm
    Please see the PDF document which tells you how to develop with KM API's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/aef1a890-0201-0010-6faf-8fa094808653
    Regards

Maybe you are looking for

  • Urgent: Report to Report Interface

    Hi Friends, I created two queries one as sender and another as receiver. In receiver i restricted it with custom variable and in sender i am using the same characteristic. now when i execute sender is not jumping to receiver although i have maintaine

  • Authentication failed in Content Viewer

    I have a client who can't log into Content View with his Adobe I.D., thus he cannot see the project I'm developing for him. When logging in he gets the dreaded "Authentication Failed" message. He has used Content Viewer in the past with no problem, c

  • Need a sample coding for  function module MRM_DBTAG_RSEG_READ

    hi, I am working on reports. I was asked to use the function module MRM_DBTAG_RSEG_READ for retrieving the line item information. I tried using the fucntion module, the problem i am facing in the declaration of the internal table I_TE_RSEG for the pa

  • Launch business rules from Planning

    Hi, I created a business rule "xyz" in EAS console with necessary validations and user/group security. I would want to associate this rule to a data form in planning. During data form design , the business rule "xyz" is not showing up in the availabl

  • Possible Cause for Ituens to crash on launch.

    Just something I found while trying to figure out why my itunes wouldnt start. If you have the Directx 9 SDK installed make sure its set to the retail version before launching. Just thought I would share the info.