Using XML as plain text in TextFilter

I have an application with an XML tag:
<mx:XML id="textXML1">
<root><c1>goodbye</c1></root>
</mx:XML>
I then have a string variable which I set equal to that XML:
var t:String = textXML1;
I then set up a TextFlow by the following line of code:
textFlow = TextFilter.importToFlow(t,
TextFilter.PLAIN_TEXT_FORMAT);
However, I then do a trace of the text value in the TextFlow:
trace("textFlow's text: " + TextUtil.extractText(textFlow));
The resultant dump is:
textFlow's text: <root>
<c1>goodby
<c1>goodbye
Any ideas?

Yes, the XML.toString() method is called. This means that t
is the result of textXML1.toString(), which, on complex XML,
produces a string of the entire XML object, tags and all. If I do a
trace on t, the output is:
<root>
<c1>goodbye</c1>
</root>
That is expected. That also means that the value of "t" is no
longer XML, just a string that looks like XML.
What is unexpected is the malformed "xml" string produced
when it's been handled by the TLF. If you note from my first post,
the result of
TextUtil.extractText(textFlow) is not the entire "xml"
string, but rather a malformed version of it. I'm assuming this is
a bug in either
TextFilter.importToFlow() or
TextUtil.extractText(), but, since there are no exposed
variables/properties on the TextFlow's text (if it has such a
variable at all), I have no way of knowing where this is breaking
down.

Similar Messages

  • How to change the HTTP Response as XML (Content Type "text\xml") ?

    Hi Friends ,
                     I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as  " OK" . In the connection test trace i have seen the Content Type as "text/html" but *  I need to get as "text\xml" .* 
                     I need to get response back as XML not plain text . 
            1  Any Configuration setting  do we need to do on Service (SICF )  ?
             2. Or any other place we need to modify to get the HTTP Response as XML not plain text
                  Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan
    Edited by: ranga rajan on Jan 2, 2008 2:07 PM

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • How to change the HTTP Response as XML (Content Type "text\xml")  When Post

    Hi Friends ,
    I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as " OK" . In the connection test trace i have seen the Content Type as "text/html" but * I need to get as XML format no Srting    ( Type "text\xml" . ) *
    I need to get response back as XML not plain text .
    1 Any Configuration setting do we need to do on Service (SICF ) ?
    2. Or any other place we need to modify to get the HTTP Response as XML not plain text
    Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • Different rich text/plain text settings for different accounts?

    I use Mail for both my work email (MS Exchange) and my personal email (webmail/IMAP). Many of my coworkers use Outlook's rich text formatting options, so I need to have my work emails go out as rich text. However I'd like to have my personal emails go out as plain text.
    I can set Mail to create new messages in plain text, but to reply in the same format of the original message. That takes care of everything EXCEPT when I compose a new message using my work address... in that case it goes out as plain text, and my coworkers complain that they can't use formatting, because their copies of Outlook are in turn configured to reply in the same format as the original message.
    So ideally what I'd like is to have two different formatting settings for my two different accounts. Anyone know how this might be done? Any plugins, etc., that might accomplish this?

    Since you are running Jaguar, Jaguar and Panther Mail do not support composing in HTML and this includes when forwarding a message received that was composed in HTML.
    Since Jaguar and Panther Mail do not support composing or forwarding HTML, you can't embed images or photos in the message body anyway.
    RTF with Tiger Mail is really HTML and although Tiger Mail does not include an HTML composer/editor, you can copy/paste HTML format from a web page and forward HTML received.
    Images/photos and single page PDF attachments are revealed as inline or viewed in place within the body of the message by default which cannot be turned off. This applies to received and sent messages which is not the same as being embedded. Embedded requires HTML and an embedded attachment is not a true attachment. All Mail.app versions render HTML received but you cannot attach a photo or image as embedded with Jaguar or Panther Mail so it doesn't matter if you use RTF or Plain Text in regards to photo/image or single page PDF attachments which appear as inline or viewed in place within the body of the message by default regardless.
    When you use Plain Text for message composition, the receiving mail client renders the text in whatever font the reader chooses.
    IMO, everyone should use Plain Text for message composition. Messages would be boring to some but the majority if not all problems experienced with email would be eliminated if HTML was banned from message composition.

  • How to log just plain text but not xml while using util.logging?

    i tried the following code to log simple messages in my app.However it logs the messages in xml. I don't want this and only plain text will be enough so what should i do? e.g. using some formatters?
    import java.util.logging.*;
    class LoggerTest{
         public static Logger logger =Logger.getLogger("demo.test");
         public static  void main(String args[]) throws Exception{
              FileHandler fh = new FileHandler("log.xml",true);
              logger.addHandler(fh);
              for(int i=0;i<100;i++){
                   logger.log(java.util.logging.Level.INFO,"appanded");
    }thx!

    This post
    http://forum.java.sun.com/thread.jsp?thread=319861&forum=31
    shows that if you make a properties file (you can name it logging.properties or whatever) with at least the line
    java.util.logging.FileHandler.formatter= java.util.logging.SimpleFormatter
    and then run with
    java -Djava.util.logging.config.file=logging.properties LoggerTest
    you will get what you want.
    You can set this property programmatically (actually the SBIS is deprecated, but I am too lazy to do the StringReader class right here):
    String my_prop = "java.util.logging.FileHandler.formatter=java.util.logg
    ing.SimpleFormatter" ;
    Properties props = new Properties (System.getProperties());
    props.load( new StringBufferInputStream( my_prop));
    System.setProperties(props);
    but you would need to set the property before you create the formatter.

  • 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

  • Putting both xml document and plain text in to the same container

    I have some configuration files written in plain text with the format 'key' = 'value'
    I want to put them into the same container with my xml document, is this possible?
    thanks

    Hi,
    yes it is. There are a couple of ways:
    1) Wrap into some XML tags and put your settings as an XML document (bad way)
    2) Use metadata of documents. You can store your plain text as metadata associated with some XML document. Also you can store a document only with metadata (i.e. with empty XML content).
    Vyacheslav

  • Reversing Configuration to allow SMB connections using plain text passsword

    I could not logon to a SMB Winows server - repeatedly getting a error -36. I found Apple Article 301580 "Mac OS X 10.4: Error -36 alert displays when connecting to a Windows server". After checking about the possibility of the server being configured to accept an encrypted password - I was resigned to following the directions in 301580 to configure your computer to use plain text passwords to make SMB/CIFS connections when the specified Samba or Windows (SMB/CIFS) server does not support encrypted passwords:
    1. Make sure that you are not currently connected to any Samba or Windows (SMB/CIFS) servers and that you do not have any Samba or Windows-related error messages open.
    2. Open the Terminal (/Applications/Utilities/).
    3. At the prompt, type: sudo pico /etc/nsmb.conf
    4. Press Return.
    5. Enter your password when prompted, then press Return again.
    6. You should see an empty file and a "New File" notice at the bottom of the pico window. If you do not see the "New File" notice, this file already exists.
    7. Enter the following into the file so that it appears as follows:
    [default]
    minauth=none
    8. Save the file (press Control-O), press Return, then exit pico (Control-X).
    9. Type: sudo chmod a+r /etc/nsmb.conf
    10. Press Return.
    11. Restart your computer.
    My question is how can I reverse this confuiguration to the previous setting where only encrypted passwords are used ?
    Thanks!

    The solution in my situation was to insert the code below at the top of the file and that took care of the problem.
    AddType image/svg+xml svg
    AddType image/svg+xml svgz

  • Sending Email using both HTML and plain text

    I could use some advise on how to start researching email for
    both HTML and plain text messages.
    I have a script called class.phpMail.php, but the code is
    alittle advanced for me. Basically I can't get
    it to work on my server and I don't know where to begin the
    learning process here.
    I talked to my provider, "HOST" company goDaddy.com and I was
    told that to connect so that I could send email I would need this
    line of code. They didn't say it should by in my php.ini file but
    that was where I found it.
    SMTP = relay-hosting.secureserver.net
    This is the smtp address that my provider uses to make the
    connection with my mail client.
    I was told that with this line of code I would not need a
    password or username
    I did some further reseach and I found an article that stated
    that my original error:
    Warning: fsockopen() expects parameter 2 to be long, string
    given in ...../php/class.smtp.php on line 105
    was being caused by this code because the $port value needed
    to be between 1 - 65365:
    $this->smtp_conn = fsockopen($host, # the host of the server
    $port, # the port to use ----- "this is line 105"
    $errno, # error number if any
    $errstr, # error message if any
    $tval); # give up after ? secs
    In particular the $port value was coming in corrupted and
    that I needed to cast it.
    I did as they suggested and made it an (int) as they
    suggested.
    $this->smtp_conn = fsockopen($host, # the host of the server
    (int)$port, # the port to use
    $errno, # error number if any
    $errstr, # error message if any
    $tval); # give up after ? secs
    It resolved part of the error message however, the other half
    of the error message is shown below:
    Message could not be sent.
    Mailer Error: Language string failed to load: connect_host
    What exactly is the connect_host they refer to in this
    message?
    Would it be the string in my php.ini file refering to the
    SMTP = relay-hosting.secureserver.net
    I have allot of what I think are disconnected questions as I
    really have just begun to work
    with the mail() function. If anyone has the time to educate
    this newbie into the wonderful
    world of email() I would appreciate it.
    Thank You
    Kevin Raleigh

    Sorry to dig up an old post, but we've spent the last few days trying to work out why an email campaign being sent from BC is going into the Junk folder of recipients that use MS Exchange. We've fixed quite a lot of issues, including the fact that Legacy Templates have random JS injected just before they get sent, so we had to switch to the new template system. We've narrowed the issue down to one of three things:
    1. A missing alt tag on the tracking image that BC drops into the email (pretty unlikely)
    2. The BC Europe IP (54.240.14.45) is blacklisted here: UCEPROTECTL2 (possible, but if you actually look it's not the IP itself, but another IP on the same network, so unlikely)
    3. The fact that the HTML email has no text component.
    I agree, BC is late on this but I think that it needs to be added, even if most users have HTML-ready email clients, spam checkers do seem to prefer multi-MIME emails.
    This is backed up by the following SpamAssassin rule, which we are currently unable to resolve:
    -1.105
    MIME_HTML_ONLY
    Message only has text/html MIME parts
    You should also include a text version of your message (text/plain)
    So in my opinion, BC do still need to add this as a feature, otherwise the system is not viable for our customers and we'll have to look elsewhere.

  • I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the butten is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the button is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • Creating a text output using XML Publisher

    Hi All,
    Recently i created a  report for my client using XMl Publisher. The Data Definition was XML and the template type was RTF and i got the output in a PDF format. All was going smoothly until the client decided at the last moment that they wanted to print this in a dot matrix printer!
    I've read some articles on XSL- Text layout templates. But i can't get my head around it (I'm Functio-Technical as opposed to Techno-Functional )
    How do i convert my RTF template to give me a text output?
    Miranga

    From what I know, you will have to create another template based on "XSL" layout or eText layout (both of them require different coding methods). The RTF can not create text outputs even in 11g. This is based on my experience so far. You can create RTF output (available by default) based on the current layout that you use for PDF and see if it can be printed in a dot matrix printer though.

  • Printing Arabic text in Oracle Application(R12i) using XML Publisher.

    Hi,
    I am using Oracle Application R12i version with Oracle database as 10g, base language as English and installed language as Arabic.
    I am trying to print the data which is there in English/Arabic in Oracle Application(using XML Publisher).
    I've created a rdf using Report Builder 10g and registered as concurrent program (XML as Output format). There after i executed the concurrent program and generated the XML file.
    Based on the XML file, i created a rtf file using XML Desktop(in Ms word) and register the same rtf file in XML Publisher Administrator for creating the XML definition and Template and Output as PDF.
    After creating a XML template, when i executed the Concurrent program, english text is shown in english but arabic text is shown some ascii characters like Question Mark(up side down).
    Could anyone please let us know the steps for doing the same or plz let us know are we missing any step.
    Quiet urgent.
    You could also reply to [email protected]
    Thanks in advance
    Your help will be appreciated.
    Edited by: user10772035 on Aug 20, 2009 10:23 PM

    Same Problem here, if you are able to solve it, please also help me.

  • How to load data in plain-text file into database by using EJB?

    Hi,
    We need to develop an on-line application which requires us to load input data
    from a selected plain-text file on the Web server (iplanet server) into the backend
    oracle database. How could I use EJB to make it happen? it seems like using Entity
    EJB is not feasible.
    Really appreciate your help!
    Corona

    Hi Corona,
    "Corona Fang" <[email protected]> wrote in message
    news:3f3b0ea3$[email protected]..
    We need to develop an on-line application which requires us to load inputdata
    from a selected plain-text file on the Web server (iplanet server) intothe backend
    oracle database. How could I use EJB to make it happen? it seems likeusing Entity
    EJB is not feasible.If you are talking about loading thousands of records,
    the preferable way is using plain JDBC calls utilizing
    batch methods.
    Regards,
    Slava Imeshev

  • Attachments converted to plain-text when using redirect rule

    When I redirect emails using a Mail rule, any attachments (as well as the entire message) are converted to plain text with extra control character, rendering the attachment unviewable. This does not happen when I manually redirect an email. Any help you can provide would be welcome.

    When I redirect emails using a Mail rule, any attachments (as well as the entire message) are converted to plain text with extra control character, rendering the attachment unviewable. This does not happen when I manually redirect an email. Any help you can provide would be welcome.

  • Save pdf file as plain text using VBA

    I am looking to save a pdf file as plain text through VBA, however I am getting the error "Security Settings Prevent access to this property or method". I had this code working in a trial version of acrobat 9.0, but I now have a licensed version through my company of Acrobat 7.0 Standard and it is not working, even after I cahnge the object reference.  Please help!
    Here is the code I am using in VBA:
    Dim AcroXApp As Object
    Dim AcroXAVDoc As Object
    Dim AcroXPDDoc As Object
    Set AcroXApp = CreateObject("AcroExch.App")
    AcroXApp.Hide
    Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
    AcroXAVDoc.Open strPDFPath, "Acrobat"
    AcroXAVDoc.BringToFront
    Set AcroXPDDoc = AcroXAVDoc.GetPDDoc
    Dim jsObj As Object
    Set jsObj = AcroXPDDoc.GetJSObject
    jsObj.SaveAs strOutputFile, "com.adobe.acrobat.plain-text"
    AcroXAVDoc.Close False
    AcroXApp.Exit

    Unfortunately, Acrobat 7 is no longer supported.

Maybe you are looking for