Txt to xml. Problems with characters(&, , ',...)

I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
Thank you.

Use JDOM to generate your XML. It will worry about escaping issues for you.
Here's a (probably rather inelegant) example for you to play around with:
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
public class DateBoom {
     public static void main(String[] args)
          throws Exception
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();
          String dodgyText = "< & '";
          Document document = builder.newDocument();
          Element root = document.createElement("root");
          root.setAttribute("dodgy",dodgyText);
          document.appendChild(root);
          Element child = document.createElement("child");
          root.appendChild(child);
          child.appendChild(document.createTextNode(dodgyText));
          Transformer transform = TransformerFactory.newInstance().newTransformer();          
          Source source = new DOMSource(document);
          Result result = new StreamResult(System.out);
          transform.transform(source,result);
}Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

Similar Messages

  • VAT declaration in XML - Problem with report RFASLDPC

    Hello all,
    I have a problem with the report RFASLDPC. We use it to download an XML file that we generated which contains the VAT declaration.
    In the report RFASDLPC, there is a FORM named QUELLFILE_PRUEFEN which stop the report and display a message : "Data file FILE_NAME is not correct".
    The reason is that QUELLFILE_PRUEFEN checks (for Belgium) that the beginning of my document starts with '000000' (six times zero). But this is impossible for an XML file to begin with '000000'. An XML file must begin with "<?xml version="1.0" ?>" or a least "<".
    Here is the code :
    FORM QUELLFILE_PRUEFEN.
      OPEN DATASET PAR_PATH FOR INPUT IN BINARY MODE.
      IF SY-SUBRC NE 0.
        MESSAGE E306 WITH PAR_PATH.        ''Quellfile nicht vorhanden
      ENDIF.
      READ DATASET PAR_PATH INTO HLP_RECORD.
      CASE PAR_FTYP.
        WHEN 'AT'.                         ''ASL Österreich
          IF HLP_RECORD(1) NE 'I' OR HLP_RECORD+46(2) NE 'ZM'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        WHEN 'BE'.                         ''ASL Belgien
          IF HLP_RECORD(6) NE '000000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        WHEN 'ES'.                         ''ASL Spanien
    *     IF HLP_RECORD(1) NE '1' OR HLP_RECORD+104(3) NE '349'.
          IF HLP_RECORD(1) NE '1' OR HLP_RECORD+1(3) NE '349'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        when 'FI'.
          if hlp_record(3) ne '000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
      ENDCASE.
      CLOSE DATASET PAR_PATH.
    The line :
    READ DATASET PAR_PATH INTO HLP_RECORD.
    Put the 128 first character of the XML file in HLP_RECORD because HLP_RECORD is defined as :
    HLP_RECORD(128) TYPE C
    So as I work in Belgium, it is the condition :
    WHEN 'BE'.                         ''ASL Belgien
          IF HLP_RECORD(6) NE '000000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
    which is checked. But this condition cleary check if the beginning of the XML is '000000' and if it is not, it stop the program.
    I searched for all the SAP notes about RFASLDPC but I found none about this problem.
    Did someone else have also this problem ? Did you find a way to solve this ?
    Thank you in advance for your help.
    Best Regards.
    Gregory Pierre.

    anyone has an idea ? ...

  • Petition: problems with characters in mail sent to Windows computers

    Sign this petition by replying to this thread if you have problems with garbled characters when sending e-mails to Windows computers. Let Apple know It's a huge problem for non-English e-mailing customers and there is no way to definitively fix it.
    I'll start it off:
    Christoffer Du Rietz
    PowerBook G4   Mac OS X (10.4.7)   17" last generation G4

    I'm not interested in knowing the gory technical
    details, I want Apple to fix the problem. The problem
    have existed for years. Non-english speaking Mac
    users run a high risk of sending e-mails that look
    like pure garbage on computers that use Windows. This
    does not help when trying to convince people that
    Macs are superior.
    I want Apple to fix Mail. Because it is
    2006!
    Your views are reasonable, but you need to send them to Apple, not just to the other users trying to provide help with problems in these forums. The channel for this is
    http://www.apple.com/macosx/feedback/
    You could also consider providing some feedback to MS. The longstanding bugs in Outlook that cause these problems represent really second-rate programming (even if it makes sense for Apple to somehow cater to them in Mail's behavior).

  • Index in Berkeley DB XML - Problems with time

    I have some querys that not show a better time after have been indexed.
    I saw that this query that show problems with index realize : ordering , substring and empty values or tag.
    This query was extracted from benchmark xbench x toxgene
    I will post the queryPlan and results before and after add index.
    computer configuration : pentim RAM : 2Gb HD : 160
    Results
    Query 1
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article w
    here every $b in $a/body/abstract/p satisfies contains($b, "hockey") return $a
    /prolog/title'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - Finished query execution, time taken = 168.522ms
    102 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article where every $b in $a/body/abstract/p satisfies cont
    ains($b, "hockey") return $a/prolog/title'
    dbxml> queryPlan 'for $a in collection("container_db_xbench_250Mb.dbxml")/articl
    e
    where every $b in $a/body/abstract/p satisfies contains($b, "hockey")
    return $a/prolog/title'
    <XQuery>
    <FLWOR>
    <ForBinding name="a">
    <Navigation>
    <QueryPlanFunction result="collection" container="container_db_xbench_25
    0Mb.dbxml">
    <OQPlan>U</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="article" nodeType="element"/>
    </Navigation>
    <Where>
    <EveryFLWOR>
    <ForBinding name="b">
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="body" nodeType="element"/>
    <Step axis="child" name="abstract" nodeType="element"/>
    <Step axis="child" name="p" nodeType="element"/>
    </Navigation>
    </ForBinding>
    <Navigation>
    <Variable name="b"/>
    <DbXmlContains>
    <Sequence>
    <AnyAtomicTypeConstructor value="hockey" typeuri="http://www.w3.
    org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlContains>
    </Navigation>
    </EveryFLWOR>
    </Where>
    </ForBinding>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="prolog" nodeType="element"/>
    <Step axis="child" name="title" nodeType="element">
    <OQPlan>P(node-element-equality-string,prefix,title)</OQPlan>
    </Step>
    </Navigation>
    </FLWOR>
    </XQuery>
    dbxml>
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article w
    here every $b in $a/body/abstract/p satisfies contains($b, "hockey") return $a
    /prolog/title'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - container_db_xbench_250Mb.dbxml - P(title) : [405] 2(0x04020204) 3(
    0x04020204) 4(0x04020204) 5(0x04020204) 6(0x04020204) 7(0x04020204) 8(0x04020204
    ) 9(0x04020204) 10(0x04020204) 11(0x04020204) ...
    Query - Finished query execution, time taken = 710.093ms
    102 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article where every $b in $a/body/abstract/p satisfies cont
    ains($b, "hockey") return $a/prolog/title'
    Query 2
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article/pr
    olog order by $a/dateline/country return <Output> {$a/title} {$a/dateline/
    country} </Output>'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - Finished query execution, time taken = 248.939ms
    405 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog order by $a/dateline/country return <Outpu
    t> {$a/title} {$a/dateline/country} </Output>'
    dbxml> queryPlan 'for $a in collection("container_db_xbench_250Mb.dbxml")/articl
    e/prolog order by $a/dateline/country return <Output> {$a/title} {$a/datel
    ine/country} </Output>'
    <XQuery>
    <FLWOR>
    <ForBinding name="a">
    <Navigation>
    <QueryPlanFunction result="collection" container="container_db_xbench_25
    0Mb.dbxml">
    <OQPlan>U</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="article" nodeType="element"/>
    <Step axis="child" name="prolog" nodeType="element"/>
    </Navigation>
    </ForBinding>
    <Sort>
    <Specification modifier="ascending|empty_least">
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="dateline" nodeType="element"/>
    <Step axis="child" name="country" nodeType="element">
    <OQPlan>P(node-element-equality-string,prefix,country)</OQPlan>
    </Step>
    </Navigation>
    </Specification>
    </Sort>
    <DOMConstructor type="element">
    <Name>
    <Sequence>
    <AnyAtomicTypeConstructor value="Output" typeuri="http://www.w3.org/20
    01/XMLSchema" typename="string"/>
    </Sequence>
    </Name>
    <Children>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="title" nodeType="element"/>
    </Navigation>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="dateline" nodeType="element"/>
    <Step axis="child" name="country" nodeType="element">
    <OQPlan>P(node-element-equality-string,prefix,country)</OQPlan>
    </Step>
    </Navigation>
    </Children>
    </DOMConstructor>
    </FLWOR>
    </XQuery>
    dbxml>
    Query - container_db_xbench_250Mb.dbxml - P(country) : NONE
    Query - container_db_xbench_250Mb.dbxml - P(country) : NONE
    Query - Finished query execution, time taken = 1573.17ms
    405 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog order by $a/dateline/country return <Outpu
    t> {$a/title} {$a/dateline/country} </Output>'
    Query 3
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article/pr
    olog where empty ($a/genre) return <NoGenre> {$a/title} </N
    oGenre>'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - Finished query execution, time taken = 207.782ms
    170 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog where empty ($a/genre) return <NoGenre>
    {$a/title} </NoGenre>'
    dbxml> queryPlan 'for $a in collection("container_db_xbench_250Mb.dbxml")/articl
    e/prolog where empty ($a/genre) return <NoGenre> {$a/title}
    </NoGenre>'
    <XQuery>
    <FLWOR>
    <ForBinding name="a">
    <Navigation>
    <QueryPlanFunction result="collection" container="container_db_xbench_25
    0Mb.dbxml">
    <OQPlan>U</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="article" nodeType="element"/>
    <Step axis="child" name="prolog" nodeType="element"/>
    </Navigation>
    <Where>
    <Function name="{http://www.w3.org/2005/04/xpath-functions}:empty">
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="genre" nodeType="element">
    <OQPlan>P(node-element-presence-none,=,genre)</OQPlan>
    </Step>
    </Navigation>
    </Function>
    </Where>
    </ForBinding>
    <DOMConstructor type="element">
    <Name>
    <Sequence>
    <AnyAtomicTypeConstructor value="NoGenre" typeuri="http://www.w3.org/2
    001/XMLSchema" typename="string"/>
    </Sequence>
    </Name>
    <Children>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="title" nodeType="element"/>
    </Navigation>
    </Children>
    </DOMConstructor>
    </FLWOR>
    </XQuery>
    dbxml>
    0x0402025E) 9(0x040202D0) 10(0x0402023F) 11(0x0402020F) 14(0x0402020F) 15(0x0402
    0253) 17(0x0402025E) 20(0x040202EE) 23(0x040202C0) ...
    Query - container_db_xbench_250Mb.dbxml - P(genre) : [235] 4(0x0402024G) 5(
    0x0402025E) 9(0x040202D0) 10(0x0402023F) 11(0x0402020F) 14(0x0402020F) 15(0x0402
    0253) 17(0x0402025E) 20(0x040202EE) 23(0x040202C0) ...
    Query - Finished query execution, time taken = 2362.08ms
    170 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog where empty ($a/genre) return <NoGenre>
    {$a/title} </NoGenre>'
    Query 4
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article/pr
    olog/authors/author where empty($a/contact/text()) return <NoContact> {
    $a/name} </NoContact>'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - Finished query execution, time taken = 680.503ms
    212 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog/authors/author where empty($a/contact/text())
    return <NoContact> {$a/name} </NoContact>'
    dbxml> queryPlan 'for $a in collection("container_db_xbench_250Mb.dbxml")/articl
    e/prolog/authors/author where empty($a/contact/text()) return <NoContact>
    {$a/name} </NoContact>'
    <XQuery>
    <FLWOR>
    <ForBinding name="a">
    <Navigation>
    <QueryPlanFunction result="collection" container="container_db_xbench_25
    0Mb.dbxml">
    <OQPlan>U</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="article" nodeType="element"/>
    <Step axis="child" name="prolog" nodeType="element"/>
    <Step axis="child" name="authors" nodeType="element"/>
    <Step axis="child" name="author" nodeType="element"/>
    </Navigation>
    <Where>
    <Function name="{http://www.w3.org/2005/04/xpath-functions}:empty">
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="contact" nodeType="element">
    <OQPlan>P(node-element-presence-none,=,contact)</OQPlan>
    </Step>
    <Step axis="child">
    <ItemType testType="text"/>
    </Step>
    </Navigation>
    </Function>
    </Where>
    </ForBinding>
    <DOMConstructor type="element">
    <Name>
    <Sequence>
    <AnyAtomicTypeConstructor value="NoContact" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </Name>
    <Children>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="name" nodeType="element">
    <OQPlan>P(node-element-equality-string,prefix,name)</OQPlan>
    </Step>
    </Navigation>
    </Children>
    </DOMConstructor>
    </FLWOR>
    </XQuery>
    2(0x0402020E) 2(0x04020212) 2(0x04020216) 2(0x0402021B) 2(0x0402021F) 2(0x04020
    223) 2(0x04020227) 2(0x0402022C) 2(0x0402022G) ...
    Query - Finished query execution, time taken = 48724.8ms
    212 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article/prolog/authors/author where empty($a/contact/text())
    return <NoContact> {$a/name} </NoContact>'
    Query 5
    dbxml> query 'for $a in collection("container_db_xbench_250Mb.dbxml")/article w
    here contains ($a//p, "the hockey") return <Output> {$a/prolog/ti
    tle} {$a/body/abstract} </Output>'
    Query - Starting query execution
    Query - container_db_xbench_250Mb.dbxml - U : [405] 2 3 4 5 6 7 8 9 10 11 1
    2 13 14 15 16 17 18 19 20 21 ...
    Query - Finished query execution, time taken = 3605.86ms
    383 objects returned for eager expression 'for $a in collection("container_db_xb
    ench_250Mb.dbxml")/article where contains ($a//p, "the hockey") return <O
    utput> {$a/prolog/title} {$a/body/abstract} </Output>'
    dbxml> queryPlan 'for $a in collection("container_db_xbench_250Mb.dbxml")/articl
    e where contains ($a//p, "the hockey") return <Output> {$a/prolo
    g/title} {$a/body/abstract} </Output>'
    <XQuery>
    <FLWOR>
    <ForBinding name="a">
    <Navigation>
    <QueryPlanFunction result="collection" container="container_db_xbench_25
    0Mb.dbxml">
    <OQPlan>U</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="article" nodeType="element"/>
    <DbXmlFilter>
    <Navigation>
    <Step axis="descendant" name="p" nodeType="element"/>
    <DbXmlContains>
    <Sequence>
    <AnyAtomicTypeConstructor value="the hockey" typeuri="http://www
    .w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlContains>
    </Navigation>
    </DbXmlFilter>
    </Navigation>
    </ForBinding>
    <DOMConstructor type="element">
    <Name>
    <Sequence>
    <AnyAtomicTypeConstructor value="Output" typeuri="http://www.w3.org/20
    01/XMLSchema" typename="string"/>
    </Sequence>
    </Name>
    <Children>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="prolog" nodeType="element"/>
    <Step axis="child" name="title" nodeType="element">
    <OQPlan>P(node-element-equality-string,prefix,title)</OQPlan>
    </Step>
    </Navigation>
    <Navigation>
    <Variable name="a"/>
    <Step axis="child" name="body" nodeType="element"/>
    <Step axis="child" name="abstract" nodeType="element"/>
    </Navigation>
    </Children>
    </DOMConstructor>
    </FLWOR>
    </XQuery>
    dbxml>
    time taken = 6038.12ms

    Hi Miriam,
    What storage model are you using, and are you using DBXML_INDEX_NODES? What indexes did you try to add to make these queries faster?
    John

  • Problems with characters like "Á", "É"

    Hi, I'm having trouble when reading data with characters "&Aacute;", "&Eacute;", "&Ntilde;" from a database. If I use this:
    stmt = this.conexion.createStatement ();it works fine, but of course cannot access the records in the ResultSet but with method next ().
    As I wanted to use absolute (), first (), etc. I wrote that:
    stmt = this.conexion.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);but when I try to read for example the word "P&Eacute;REZ", I get the word "0x50C38952455A".
    Can anyone help? Thanks in advance.

    This is my connection code:
          Class.forName("oracle.jdbc.driver.OracleDriver");
          conn = DriverManager.getConnection(url, login, password);The code that works:
    (1)
        stmt = conn.createStatement ();The code that doesn't:
    (2)
        stmt = conn.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);Then, the same code to execute the query:
        rs = stmt.executeQuery ("SELECT MY_VARCHAR_FIELD FROM MY_TABLE");And to retrieve the value:
        String myValue = rs.getString ("MY_VARCHAR_FIELD");The odd thing is that before using a scrollable ResultSet (code snippet (1)), this worked perfectly. But, since I changed to code snippet (2), it doesn't for those characters.

  • XML problem with getPayload

    Hi,
    I have come across an obscure but annoying xml bug in the bpel (collaxa?) implementation. I need to use xs:extension elements in the schema for the payload contents, which then of course requires a declaration of the xsi namespace. The payload is saved fine, and when I view the contents in the bpelconsole, it is there (as shown below). However, when I get the task and call getPayload, the xsi declaration is missing from the element, which then crashes JAXB.
    This is what is shown in the BPELConsole audit:
    <payload>
      <process-request xmlns="urn:ch.bedag.pef.iflow.process" user="ea91" process-name="Wohnadresse">
        <person xmlns="urn:ch.bedag.pef.iflow.core">
          <angestellter>
            <anstellung/>
            <wohnadresse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdresseSchweiz">
              <adresszusatz>c/o Bedag Informatik</adresszusatz>
              <strasse>Gutenbergstrasse 1</strasse>
              <ort>Bern</ort>
              <plz>
                <plz>3000</plz>
              </plz>
            </wohnadresse>
          </angestellter>
          <name>Prince</name>
          <personalnummer>
            <personalnummer>111111</personalnummer>
          </personalnummer>
          <vorname>John</vorname>
        </person>
      </process-request>
    </payload>And this is what I get when I call getPayload:
    <process-request xmlns="urn:ch.bedag.pef.iflow.process" user="ea91" process-name="Wohnadresse">
      <person xmlns="urn:ch.bedag.pef.iflow.core">
        <angestellter>
          <anstellung/>
          <wohnadresse type="ns1:AdresseSchweiz">
            <adresszusatz>c/o Bedag Informatik</adresszusatz>
            <strasse>Gutenbergstrasse 1</strasse>
            <ort>Bern</ort>
            <plz>
              <plz>3000</plz>
            </plz>
          </wohnadresse>
        </angestellter>
        <name>Prince</name>
        <personalnummer>
          <personalnummer>111111</personalnummer>
        </personalnummer>
        <vorname>John</vorname>
      </person>
    </process-request>The only difference is in the wohnadresse element, which has the correct xsi:type attribute, but the xsi: namespace declaration is missing.
    Any chance of fixing this? Otherwise I will have to convert the payload to a string, fix the problem, back to xml and then pass it off to jaxb. Very irritating...
    I don't know if it will help, but I did see the same problem when I tried converting a string to xml using a DOMResult and a Transformer. I switched to DOMParser and and InputSource and the problem went away.
    Thanks
    John

    Hi
    After a lot of experimenting, it looks like there are two problems:
    1. If I call IDeliveryService.post with a NormalizedMessage constructed with a String, bpel is not completely reliable with the namespaces (it converts them all to default namespaces defined on particular elements, but it missed the namespace within the xsi:type declaration). I fixed this by using DOMUtil to convert the string to a CubeDOMElement, which is then correctly converted to the input variable.
    2. The CubeDOMElement also makes mistakes if you use Element.getElementsByTagNameNS(ns, name). Even when all the information was there, the method removed one of the namespace declarations (actually a duplicate, but necessary because the prefix was used in the document).
    I got round this by calling the CubeDOMElement method getContentAsXml, which bizarrely returns the full xml of the child nodes, with all namespaces correctly defined and used, and then converting the xml string into a normal org.w3c.Element.
    It looks like a few more test cases are needed for the collaxa xml implementation...
    Best wishes
    John

  • XML problem with one set of  url tags

    I have all my pages for my site on my xml map and have it successfully submitted to google webmster. All but one link, which google never recognizes for some reason. It is a strange little problem. The following is an example of how I have it written and it works for every page except for my login page!
    <url>
    <loc> http://www.myfaithworks.me/ </loc>
    <changefreq>monthly</changefreq>
    <priority>1.0</priority>
    </url>
    <url>
    <loc> http://www.myfaithworks.me/apps/auth/login?try=1&next= </loc>
    <changefreq>monthly</changefreq>
    <priority>1.0</priority>
    </url>
    Refering to the latter, the bottom tags are the problem, google will not allow me to submit for some reason. I think the problem is within the link, but this is the actual link. I don't knw what to do. I knw the tags have no error, and all my other pages have been accepted without any errors.

    Try this, it is possible that the error is because of '&' or '?'. Having a CDATA will ensure that the server will not try to parse those but instead treat them as text/characters.
    <url>
    <loc><![CDATA[http://www.myfaithworks.me/apps/auth/login?try=1&next=]]></loc>
    <changefreq>monthly</changefreq>
    <priority>1.0</priority>
    </url>

  • XML problems with WM 5.0 emulator

    I have a FL 2.0 app that loads xml just fine. However, when I
    just tried it in the WM 5.0 320x240 emulator, it wouldn't load the
    xml, it gave an error, saying that the xml call was not associated
    with a key event or a mouse event. It's loaded through a function
    on the second frame, that shouldn't be a problem. Anyone else had
    this problem or know how to help me out? I did not think that the
    jump to 2.1 would be much of a challenge.
    It also runs full screen in the emulator, but off center, to
    the right.
    Any help is very much appreciated.

    Have you tested this on a device? Else we have a generic
    emulator for
    FlashLite 2.1(
    http://labs.adobe.com/wiki/index.php/Flash_Lite_2.1_Authoring)
    on Flash 8 professional. Can you try on a device or on
    FlashLite 2.1
    emulator with Flash 8?
    Regards,
    Vijayan.
    "bbonnet18" <[email protected]> wrote in
    message
    news:ej12gk$qf9$[email protected]..
    >I have a FL 2.0 app that loads xml just fine. However,
    when I just tried it
    >in
    > the WM 5.0 320x240 emulator, it wouldn't load the xml,
    it gave an error,
    > saying
    > that the xml call was not associated with a key event or
    a mouse event.
    > It's
    > loaded through a function on the second frame, that
    shouldn't be a
    > problem.
    > Anyone else had this problem or know how to help me out?
    I did not think
    > that
    > the jump to 2.1 would be much of a challenge.
    >
    > It also runs full screen in the emulator, but off
    center, to the right.
    >
    > Any help is very much appreciated.
    >

  • Problem with characters in text field

    hi all
    i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
    characters like the euro sign and accentuated german a letter.
    whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
    How ive set up the fla:
    1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
    2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "Arial";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = false;
    T_text.textColor = "0x666666";
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setNewTextFormat(myFmt);
    now, im calling text from a database.
    when calling the text from the browser  url bar, there's no chars missing.
    its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
    below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
    http://img210.imageshack.us/img210/340/utf8.png
    any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
    anyone has seen this issue before and know how to solve it?
    regards

    no.
    you assigned your embedFonts property to be false.
    look, you can test if you've embedded fonts correctly by using:
    T_text._rotation=3;
    if you see no text, you're not embedding fonts correctly.
    so, use:
    T_text.embedFonts=true;
    and then test.  if you see no text, use:
    click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok.  then use:
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "ArialID";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = true;
    T_text.textColor = 0x666666;  // no quotes here.  this is a number
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setTextFormat(myFmt);  // to format the above text, use setTextFormat().  if you want to format text added after this line, use setNewTextFormat()

  • Problem with characters Converting OTF Spool to PDF

    Hello All,
    Im working on ECC6.0 system. I have a Z report where it will take spool number and mail ID as input.
    It will check wheter the spool is of type OTF of ABAP List, according to that it will use the FMs ONVERT_OTFSPOOLJOB_2_PDF & CONVERT_ABAPSPOOLJOB_2_PDF.
    Now it will download the PDF internal table data into a file using OPEN DATA SET statement as shown below.
      OPEN DATASET gv_dsn FOR OUTPUT IN BINARY MODE.
    *Download the file to application server
      LOOP AT gt_pdf_output.
        TRANSFER gt_pdf_output TO gv_dsn.
      ENDLOOP.
      CLOSE DATASET gv_dsn.
    and it will ZIP the PDF as shown below.
    * open the file from application server for zipping.
      OPEN DATASET gv_dsn FOR INPUT IN BINARY MODE.
      READ DATASET gv_dsn INTO lv_content.
      CLOSE DATASET gv_dsn.
      CREATE OBJECT go_zip.
      go_zip->add( name = gv_file content = lv_content ).
      gv_zip_content    = go_zip->save( ).
    * Convert the xstring content to binary
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer        = gv_zip_content
        IMPORTING
          output_length = gv_file_length
        TABLES
          binary_tab    = gt_data.
    After that the ZIP file conataining the PDF will be sent as an attachement to the mail ID given as input.
    Now the problem is some characters of Czech are not coming properly when the attachement is opend once the mail is received. Can any one tell where the problem is and solution.
    Im getting the message "Can not extract the embedded front 'CourierNewL2'. Some characters may not display or print correctly." while opening the PDF in the ZIP attachment.
    Thank you.
    Best Regards,
    Sasidhar Reddy Matli.

    hi
    u also check the following link
    Re: how call FM otf to pdf in a report
    Re: otf to pdf
    Re: Error while converting OTF into PDF in CONVERT_OTF FM
    Re: Convert OTF to PDF problem
    Edited by: krupa jani on Jul 15, 2009 12:58 PM

  • LoadVars problem with characters

    hello everyone, i am a Actionscript novice and I have a small
    problem.
    i am using the LoadVars class and the toString method to
    retrieve some result from the web. The result obtained is
    represented by the following string (which is not the full string,
    as it'll be much longer to write) :
    sendRPCDone%28frameElement%2C%20%22chelsea%22%2C%20new%20Array%28%22chelsea%22%2C%20%22che lsea%20fc%22%2C%20%22
    The problem is: how do I convert these characters in Unicode
    mode, such as %28, into ' ( ' ? Is there any special function?
    thanks
    K

    thanks blemmo

  • Problem with characters from SerialPort

    Hii!! My problem is: How to convert the characters of SerialPort ??
    For example, I receive from SerialPort:
    sESB="U����U����U����+�&#154;&#131;�"DDDDDDDDDDDDDDDDDDZ#�&#142;fffffffffffffffffffffffffffffffffff�"
    my programa for convert is:
    public String getASC(String sESB)
         String sASC = "";
         CharToByteConverter cb = CharToByteConverter.getConverter("CP500");
         sEBC = new String(cb.convertAll(sESB.toCharArray()));
         return sASC;
    but I obtain :
    ����������������{�����������"�������������������]�����������������������������������������W
    I want to obtain normal characters, for example 'hello' .
    Thanksss

    Hi!! My way for convert the bytes is :
    private String readData()
    byte[] buffer = new byte[32];
    try
    while( IS.available() > 0 ){ int numBytes = IS.read(buffer); }
    catch (IOException e)
    return( new String(buffer) );
    First, for example I obtain 'OK', 'CARRIER DETECT'... this works fine, but then the data I need are:
    UUU+??\"DDDDDDDDDDDDDDDDDDZ#?ffffffffffffffffffffffffffffffffff
    I don't know .... help!! Thanksssssssssssss

  • Loading XML problem with spry

    I have a php page that creates a recordset from mySQL and the exports it as XML so I can load it into dreamweaver to use with spry
    this particular recordset filters the results according to a session variable, so the results are relevant to the logged in user
    in dreamweaver the XML will not load though, as I assume this is because dreamweaver does not have a session with the server, so the required session variable does not exist.  the page access is also restricted (needs a user to have logged in tot he site thus creating the session)
    how can I set the sesssion variable in dreamweaver so when it requests the XML is will load
    hope that makes sense

    If you talking about seeing the SPRY XML in the Bindings panel, then Dreamweaver cannot set a Session Variable to my knowledge.
    What I do is use a Default Value in my SQL statement to guarantee it returns a recordset.
    Hope this helps.

  • Problem with characters of the forms

    I have installed an IAS 10.1.2.0.2 (forms, reports and discoverer components) in a solaris 10 SPARC machine IASDB character set:
    AMERICAN_AMERICA.EL8ISO8859P7.
    I've imported some .fmb forms from windows platform and recompiled to make them .fmx.
    Though the re-compilation is successful the greek characters are shown ???? like that (these are not characters taken from the DB but labels in the forms).
    My .cshrc file has the following values:
    #ident "@(#)local.cshrc 1.2 00/05/01 SMI"
    umask 022
    set path=(/bin /usr/bin /usr/sbin /usr/ccs/bin /usr/ucb /etc .)
    if ( $?prompt ) then
    set history=96
    set prompt="`whoami`@`hostname`: "
    set filec
    endif
    setenv TEMP /tmp
    setenv TMPDIR /tmp
    setenv EDITOR vi
    setenv ORACLE_SID IASDB
    setenv ORACLE_HOME /oracle/OraHome_2
    setenv FORMS_HOME /oracle/OraHome_2/forms
    setenv PATH $ORACLE_HOME/bin:$FORMS_HOME/fmx:/usr/local/bin:/usr/openwin/bin:/opt/Adobe/Reader8/bin:/usr/sbin:/opt/sfw/bin:${PATH}:/sbin
    setenv NLS_LANG AMERICAN_AMERICA.EL8ISO8859P7
    alias h history
    alias s sync
    I've changed my locale setting to: LANG=el_GR.ISO8859-7
    also i have in my envFile entered NLS_LANG=AMERICAN_AMERICA.EL8ISO8859P7
    and finally in frmcmp_batch.sh have set:
    NLS_LANG=AMERICAN_AMERICA.EL8ISO8859P7
    export NLS_LANG
    I still get the ???? characters instead of greek fonts.
    can anyone help, this is urgent.
    Thank you

    When translating your form MAKE SURE YOU LOGIN TO SAP WITH THE TARGET LANAGUAGE FOR TRANSLATION!
    For example, if you have an english form and want to translate it to spanish, login in spanish, go to SFP and do your translation to spanish. It should have a pop-up shown that says "original language" is English....keep it as that.
    Not sure why it works this way, but it does. I would love to be able to login in English and then simply do all my other translations from there, but it doesn't work that way.

  • XML: Problem with getting the nodevalue

    Hi all,
    I have the following xml-file:
    <ROOT>
    <ROW1>
    <Outer> Outer1 <Inner>Inner</Inner> Outer2 </Outer>
    </ROW1>
    </ROOT>
    I need to get the full-nodevalue of <Outer> (Outer1 <Inner>Inner</Inner> Outer2).
    I do not use the XMLDB and XMLType.
    I parse the XML-File using xmlparser and xmldom packages from pl/sql.
    Any ideas?
    Regards

    Probably can anyone help me to get only Outer2?
    With xmldom.getnodevalue I get only Outer1.
    Regards

Maybe you are looking for

  • Unable to release the Check-in status of a checked-out item.

    Dear all, I am using Portal 10.1.2 and now facing a problem that someone "A" has the privilege to add file items on a page where an approval process ("X", "Y", "Z", only one must approve) is defined. "A" add a new file to the page. He did it as usual

  • Problems with Home Sharing - works with some users but not all

    Hi all, On our Mac we have 3 different user accounts. Among the three, home sharing seems to work for two of them, but not three. For example, if I'm logged into User A's account, I'm able to access the library for users B & C. However, B & C are abl

  • Do illustrator cs6 document open in illustrator cs5?

    do illustrator cs6 document open in illustrator cs5?

  • Photos dont match the monitor

    I have read through discussions on this but am still doing something wrong apparently. I have a Lenovo Ideacenter all in 1 (520), and an Epson R3000. My monitor is calibrated with ColorMunki. I shoot in Adobe RGB and use that color space in Photoshop

  • Project Version Tables for Dates

    Hi, I have to develop a report to compare the Planned vs actual dates of WBs and Activity, for which i am using the Project Version. But not able to get the Table and fields where Project Version Data is stored, pls hepl to find that.