Format XMl to be read in a text editor.

Hi,
I'm using ixml functions to create an xml file. Each element of my document is created using :
<cl_xml_document> ->create_simple_element
I then export it to a file with :
<cl_xml_document>->export_to_file
When the created file is opened with an xml viewer, it appears well presented, every tag is displayed on a seperate line.
However, once opened with a text editor, the whole content is displayed on one line. Is there to format the file with some sort of line seperator?
On debugging, I found out that only one line of its internal table is used to store the data.

Welcome to SDN
Try this,
data: temp_str type string.
concatenate '>' cl_abap_char_utilities=>cr_lf '<' into temp_str .
replace all occurrences of '><' in XML_STRING with temp_str.
xml_string is the straing variable to hold the xml .
now use xml_string to show it in texteditor.
Regards
RAja

Similar Messages

  • Where can I download a Java Text Editor?

    I am new to java. And want to have a text editor which can color code the program and keep it in more user friendly format.
    Where can I get such text editor from?
    Thanks

    Check out the category Java Editors at http://www.esus.com:
    http://www.esus.com/javaindex/gettingstarted/writingprograms/javaeditors/javaeditors.html
    Cheers,
    Joris

  • When reading the Rich Text present in Excel column using open XML its taking it as plain text

    Hello All,
    When i am reading excel columns using open Xml in C# everything is working fine except the column that
    contain Rich Text (ex: bold, italic,color,size). Its reading the Rich Text content as plain text. As we know for Rich Text in open XML we get the text as Runs (C#
    object) which contains the text as value and rpr as run properties. I have also written the code to convert Runs to html. But the issue is that for some Rich Text format its reading it as Runs but most of the Rich Text its reading it as plain text.
    The issue i am getting is, for some rich text its creating RUN and for some of the rich text its not creatingRUN.
    Let me give the example for more understanding:
    Suppose i have two cells in excel which contains the below text.
    1. Rich Text
    1
    2. RichText
    2
    Now when i read these cells using the below code
    var stringTable =spreadsheetDocument.WorkbookPart.GetPartsOfType<SharedStringTablePart>().FirstOrDefault();
    if (stringTable.SharedStringTable.ElementAt(index1).ChildElements.GetItem(0).GetType().Name == "Run")
    Custom code to convert Rich text to HTML...
    else
    Read the plain text...
    Though both the cell contains rich text, one is going in RUN block and one is going in Plain text bloc.
    Also, one thing that i have noticed is when i use standard color for text its consider it as RUNS and when i use color apart from the standard color it does not consider it as RUNS. Same behavior occurs for different combination of text viz. bold, italic, underline
    etc

    Hi Ejaz,
    This forum is for software developers who are using the Open Specification documentation to assist them in developing systems, services, and applications that are interoperable with Microsoft products. The Open Specifications can be found at:
    http://msdn.microsoft.com/en-us/library/cc203350(PROT.10).aspx. Since your post does not appear to be related to the Open Specification documentation set, we would appreciate it if
    you could try to post your question in a more relevant forum. Thank you.
    Open XML Format SDK
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=oxmlsdk&filter=alltypes&sort=lastpostdesc
    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

  • Using a CWM format XML as datastore; COM SDK to read the file and create Universe

    Hello everyone
    We are in the process of migrating from a metadata store to BusinessObjects Universe and the plan is to use Java/COM SDK to accomplish that. We have run into limitations with both the SDKs. Java SDK doesn't provide that facility and using COM SDK we are trying to read from a XML file (metadata in CWM format) and create the universe but so far haven't been successful. If the (Universe)Designer can read a CWM format xml file (say created from BODS) we are wondering why can't a customer made COM program do the same.
    Has anyone attempted this and been successful. Please acknowledge.
    Thanks

    I have written C#.NET code to build universes on the fly using the Designer SDK with no problems.  However, I wasn't using CWM formatted data to do this.
    I have two suggestions for you:
    1.  Since not all of the functionality in the Designer tool seems to be available through the SDK, can you parse the CWM xml file in your code and build the universe based on the data instead of trying have Designer build it?
    2.  Since you're using Java, you may get better answers by posting this question in the Java SDK Application Development space here:  http://scn.sap.com/community/bi-platform/java-sdk
    -Dell

  • Adf Input Text with formatted xml Content

    Hi,
    I have a requirements where I get an xml content in one line
    as suppose <xml ><a><a1></a1><a2><a2></a><b></b></xml>
    I want this Input text to render it proper fromat like
    <xml >
        <a>
            <a1>
            </a1>
             <a2>
             <a2>
       </a>
       <b>
      </b>
    </xml>I tried to set wrap property to soft
    but it is not affecting
    Please tell me any component that will properly structure the input xml
    How can I do this.

    User, please tell us your jdev version!
    There is no component AFAIK. You may want to try the rich text editor, but if I remember it correct it won't do what you want.
    My solution would be to write a custom converter and format the code in the converter to show it then in the inputText.
    Timo

  • 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 formatting not fine in a text editor

    Hello Experts,
    am generating an xml file through a java program using javax.xml.parsers.
    Following is the format of file (say for eg) generated when i see in notepad
    <root><tag1>val1</tag1><tag2>val2</tag2></root>
    which is not required. I want the file to be in the following format.
    <root>
         <tag1>val1</tag1>
         <tag2>val2</tag2>
    </root>
    When the file is viewed in any browser, it is fine but is getting messy in a text editor.
    Please Help. It would be really appreciated.
    Regards
    Priya

    idTransform2.setOutputProperty("indent", "yes");
    "indent" property is used for that purpose,use the following program.
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    public class SocketExample
         * @param args
         * @throws IOException
         * @throws ParserConfigurationException
         * @throws TransformerException
         public static void main(String[] args) throws IOException, ParserConfigurationException, TransformerException
              DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
              DocumentBuilder parser = fact.newDocumentBuilder();
              Document doc = parser.newDocument();
              Node root = doc.createElement("request");
              doc.appendChild(root);
              Node Last_Name_Node = doc.createElement("Last_Name");
    root.appendChild(Last_Name_Node);
    Last_Name_Node.appendChild(doc.createTextNode("Last_Name"));
    Node Title_Node = doc.createElement("Title");
    root.appendChild(Title_Node);
    Title_Node.appendChild(doc.createTextNode("Title"));
    // setting Servcie Address1
    Node Service_Address1_Node = doc.createElement("Service_Address1");
    root.appendChild( Service_Address1_Node);
    Service_Address1_Node.appendChild(doc.createTextNode("Service_Address1"));
              TransformerFactory xformFactory2 = TransformerFactory.newInstance();
              Transformer idTransform2 = xformFactory2.newTransformer();
              javax.xml.transform.Source input2 = new DOMSource(doc);
              javax.xml.transform.Result output2 = new StreamResult(new java.io.FileWriter("d:/webapp.log",true));
              idTransform2.setOutputProperty("indent", "yes");
              idTransform2.transform(input2, output2);
    Message was edited by:
    BhavaniRajan

  • How to convert well format xml in coldfusion?

    Hi,
    I am consuming asp.net webservice in coldfusion.It returns xml but it is not in wellformat.
    Please suggest me how to convert to well format xml.
    Advance Thanks,

    chandra12345 wrote:
    I am consuming asp.net webservice in coldfusion.It returns xml but it is not in wellformat.
    Please suggest me how to convert to well format xml.
    Technically speaking, a piece of text must be well-formed before it can be called an XML document. So you cannot yet say the returned text is XML.
    The first thing to do is to check whether it is. Use, for example, isXml(someString) to check whether someString is well-formed XML.
    There is no one standard way to convert text to well-formed XML. This is because there are infinitely many ways in which text can fail to be well-formed. The easiest solution for you will be to learn the rules for well-formed XML.
    Any elementary book on XML will teach you that. If you find books old-fashioned, then you could instead google well-formed xml .

  • Hello All. I am working on a form, but I need to format the leading in a multi-line text-field.

    Hello All. I am working on a form, but I need to format the leading in a multi-line text-field. The options for the text-field only show a font size option, but no other styling options. Is there a way to format the leading? Thanks!

    Not within ID, and I'm not sure it can be done in Acrobat afterward either.

  • How to fix iframe issue that displays XML values instead of formatted XML in IE11

    The following sub.jsp file shows the formatted XML properly as expected when is opened directly:
    <% response.setContentType("text/xml"); %>
    <book>
    <chapter1>chapter 1</chapter1>
    <chapter2>chapter 2</chapter2>
    </book>
    IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
    <book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
    But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <iframe src="sub.jsp"></iframe>
    </body>
    </html>
    The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
    I appreciate to your if you know how to address this issue.
    Regards, Amir

    The following sub.jsp file shows the formatted XML properly as expected when is opened directly:
    <% response.setContentType("text/xml"); %>
    <book>
    <chapter1>chapter 1</chapter1>
    <chapter2>chapter 2</chapter2>
    </book>
    IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
    <book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
    But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <iframe src="sub.jsp"></iframe>
    </body>
    </html>
    The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
    I appreciate to your if you know how to address this issue.
    This issue is also posted at below link:
    https://social.msdn.microsoft.com/Forums/en-US/5b0692b4-d312-4797-9089-42c1029ac059/how-to-fix-iframe-issue-that-displays-xml-values-instead-of-formatted-xml-in-ie11?forum=iewebdevelopment
    Regards, Amir

  • Read url from text file

    I am new to Adobe Air. I was able to load a web browser as an Air app with the following line:
    <mx:HTML id="myBrowser" width="100%" height="100%" location="http://www.google.com"/>
    My  question is this: is it possible to add a text file to the project (to  be stored locally) that can be read by the application so that the  location attribute (URL) can be dynamically populated?
    I want the user to be able to change the starting URL by manually editing this text file.
    Any help I can get is appreciated!
    Note:  I am aware that a URL bar can simply be added to the app, but that is  really not the solution that I'm looking for. I don't want the user to  be able to change the url using the GUI.

    Great, thank you for your response!
    Could you give me a sugestion on how to aproch the code. Specifically how to read the file itself. Would it require a specific format?
    Thanks you.

  • Export table to formatted xml

    I have an oracle table i have to export as formatted xml
    I really want the data to look like this : (and need to get rid of the cdata)
    <?xml version='1.0' ? XML_DATE = "2012-06-26 08:12:09 PM">
    <APPLICATION NAME = "XMLTESTING">
         <WEBPAGE>
              <PROJECT>
    <column1>ABC</column1>
    <column2>DEF</column2>
    <column3>GHI</column3>
    <column4>JKL</column4>
    <column5>MNO</column5>
    </PROJECT>
    <PROJECT>
    <column1>ABG</column1>
    <column2>DRF</column2>
    <column3>GLY</column3>
    <column4>JAL</column4>
    <column5>MPO</column5>
    </PROJECT>
    <PROJECT>
    <column1>BBC</column1>
    <column2>GEF</column2>
    <column3>LHI</column3>
    <column4>JCL</column4>
    <column5>MWO</column5>
    </PROJECT>
    </WEBPAGE>
    </APPLICATION>
    create table "XML_TESTING" (
    "column1" varchar2(50byte),
    "column2" varchar2(50byte),
    "column3" varchar2(50byte),
    "column4" varchar2(50byte),
    "column5" varchar2(50byte)
    INSERT into XML_TESTING values ('ABC','DEF','GHI','JKL','MNO');
    INSERT into XML_TESTING values ('ABG','DRF','GLY','JAL','MPO');
    INSERT into XML_TESTING values ('BBC','GEF','LHI','JCL','MWO');
    CREATE TABLE xml_cl(result CLOB);
    DECLARE
    ctxqry DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    ctxqry := dbms_xmlgen.newContext('SELECT * FROM xml_testing');
    DBMS_XMLGEN.setRowTag(ctxqry,'APPLICATIO NAME = "XML TESTING"');
    --DBMS_XMLGEN.setMaxRows(ctxqry,5);
    DBMS_XMLGEN.setrowsettag(ctxqry,'WEBPAGE');
    LOOP
    result := DBMS_XMLGEN.getXML(ctxqry);
    EXIT WHEN
    DBMS_XMLGEN.getNumRowsProcessed(ctxqry)=0;
    INSERT INTO xml_cl VALUES(result);
    END LOOP;
    END;
    SELECT * FROM xml_cl
    THEN I EXPORT TO XML FROM HERE.
    this is how xml currently looks
    <?xml version='1.0' encoding='Cp1252' ?>
    <RESULTS>
         <ROW>
              <COLUMN NAME="RESULT"><![CDATA[<?xml version="1.0"?>
    <WEBPAGE>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>ABC</column1>
      <column2>DEF</column2>
      <column3>GHI</column3>
      <column4>JKL</column4>
      <column5>MNO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>ABG</column1>
      <column2>DRF</column2>
      <column3>GLY</column3>
      <column4>JAL</column4>
      <column5>MPO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>BBC</column1>
      <column2>GEF</column2>
      <column3>LHI</column3>
      <column4>JCL</column4>
      <column5>MWO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    </WEBPAGE>
    ]]></COLUMN>
         </ROW>
    </RESULTS>
    hope someone can help.
    did alot of searching and reading and just cant find an answer
    thank you

    Use SQL/XML functions to build and serialize the document as CLOB in a single query :
    SQL> SELECT XMLSerialize(document
      2           XMLElement("APPLICATION",
      3             XMLAttributes('XMLTESTING' as "NAME")
      4           , XMLElement("WEBPAGE",
      5               XMLAgg(
      6                 XMLElement("PROJECT",
      7                   XMLForest("column1", "column2", "column3", "column4", "column5")
      8                 )
      9               )
    10             )
    11           )
    12           as clob
    13           indent --< for formatting purpose only
    14         )
    15  FROM xml_testing
    16  ;
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    <APPLICATION NAME="XMLTESTING">
      <WEBPAGE>
        <PROJECT>
          <column1>ABC</column1>
          <column2>DEF</column2>
          <column3>GHI</column3>
          <column4>JKL</column4>
          <column5>MNO</column5>
        </PROJECT>
        <PROJECT>
          <column1>ABG</column1>
          <column2>DRF</column2>
          <column3>GLY</column3>
          <column4>JAL</column4>
          <column5>MPO</column5>
        </PROJECT>
        <PROJECT>
          <column1>BBC</column1>
          <column2>GEF</column2>
          <column3>LHI</column3>
          <column4>JCL</column4>
          <column5>MWO</column5>
        </PROJECT>
      </WEBPAGE>
    </APPLICATION>
    Then you can call DBMS_XSLPROCESSOR.CLOB2FILE to write the CLOB to a file, no need of an intermediate table.

  • Do you have examples of CSV Format XML that can handle relationshiptypes?

    Hi,
    I have created a Windows Computer extended class that, for the sake of the example, has an additional property
    ServerNameRow , and a relationship (selected via Single Instance Picker control)
    BusinessUnitCustomersListPickerClass_Relationship. (The Single Instance Picker selects the primary name field/property only)
    I want to import data via CSV, and/or PowerShell. Both need a Format XML file.
    I don't know what the syntax is for relationship BusinessUnitCustomersListPickerClass_Relationship.
    What I'd need is some examples, preferably of a non-extended class and of an extended class's format XML.

    http://blogs.technet.com/b/servicemanager/archive/2009/05/26/using-the-csv-import-feature.aspx
    At the bottom of that blog post is an attachment (CSVImport.docx). It contains all the information you'll need for constructing CSV imports, including examples.
    To import relationships, you'll need to define a type projection targeting the windows computer class that contains a component for your custom relationship type.
    Also note you should not use the extension class itself in your definition file or in the type projection definition. Just use the windows computer class. Don't worry..your extension class property will be recognized by the import process. Extensions
    to a class are different than inherited classes.

  • Formatting text with a text editor within a website?

    My wife wants to use her new iPad 2 to participate in an online community (Ravelry, a knitting and crocheting site).  She does a great deal of posting to forums within this community.  The text editor for posting in these forums allows users to format their text (bolding, italicize, etc.) as well as to link to other external and internal pages within the site (writers in the forum frequently link to patterns and project images within the site as references in their posts).  When she attempts to use the text editor in Ravelry from her iPad, she is unable to select the text she wants to highlight and alter it (by bolding or making it a link).  When we select the text, the only options are to copy or cut and we can't, once we've selected the text, tap on the "create a link" button  in the text editor.  We've tried to use both Safari and Atomic Web browsers, but no luck.   Help?

    ravelry.com is using WMD-Editor which is a WYWIWYM Markdown editor. Unfortunately it appears their chosen WYWIWYM Markdown editor is no longer or is pretty deprecated.
    You as a user are not going to be able to swap out your own editor for use on any website...these editors are hard coded by the website developer...perhaps you could, as already suggested ask them to update to a more robust editor which supports today's standards. Though I doubt you will get far in having them swap out code for this.
    A Solution:
    Download an alternate browser such as iCabMobile for iOS...I tested ravelry against this browser and the editor does work but is pretty unstable. Funtional but not as intended. Safari cannot load this editor properly at all.
    Log into your ravalry account and read their FAQ (http://www.ravelry.com/wiki/pages/UsingTheTextEditor#formatting_bolditalic_lists _and_other_basics)
    Simple BBCODE commands for formatting where you do not need to even use the tool bar work fine...just a hassle to memorize.
    Hope this helps.

  • Formatted text editor/view

    Hi,
    I have to display a set of messages with icons in a read only text area.
    Two options I have are:
    1. Formatted text view - here I cannot restrict the size, is there any way to do that?
    2. Formatted text editor - here, I get the toolbar with 'bold', 'italics', etc. icons on top. Is there a way to hide it? Please help.
    Regards,
    Rachita.

    Personally it sounds like I would go for the FormattedTextEditor.  I don't believe that you can completely remove the button bar at the top.  However you can put the UI element into ReadOnly mode via the corresponding property.  The buttons are then disabled.  Not the best look, but something I think end users are used to.

Maybe you are looking for