[xml] ascii 172 added

Hello

I started by pulling on the text of a textFrame who had ' LICENSE '.  I kept this string to an xml object (name of the variable 'x') and then he wrote in a XML as follows:

filePath.encoding = 'UTF8 ';

filePath.open ('w');

filePath.write (x.toXMLString ());

filePath.close ();

Now when I look in the xml file, it is the character of real copyright symbol instead of & # 1-6-9;  (I added spaces, so I hope that will not be converted in the message).

Seems that my file xml contains a copyright symbol character, then if I pull that data and store for an XML object in InDesign, and then it adds character ASCII 172 before this symbol of copyright law.  If I put in a textFrame, you don't see this character (ASCII 172) but if you use the arrow keys you can tell it's there.

Any ideas on why 172 ASCII is added before the copyright symbol?  Furthermore, I use InDesign CS5.5 on OS X Lion.

Here is an example of xml data that was saved in the xml file:

<? XML version = "1.0" encoding = "UTF-8"? >

< cbAttrs version = "1.0" >

< copyright id = '10-1' w '69.16' = h = "32.1990625000001" x = "-57.2081831359861" y = "243.181297317146" > © LICENSING < / copyright >

< / cbAttrs >

And here is the code I use to extract the data from the xml file:

var xmlPath = File('/Path/to/xml');

If (xmlPath.open ('r')) {}

xmlText var = xmlPath.read ();

xmlPath.close ();

var x = XML (xmlText);

}

var a = x.copyright.toString ();

$.writeln (a [0] .charCodeAt ());

$.writeln (a);

Gives me:

172

¬ © LICENSES

Thanks for looking at my questions.

Here's the problem:

filePath.encoding = 'UTF8 ';

.. because is out of reach for the 7-bit ASCII, it gets the tag as a two byte character UTF8 (see http://www.fileformat.info/info/unicode/char/a9/index.htm).

At the moment is a mystery to me why you would get the area code is not 172, instead of the correct code of the UTF8 0xC2 (194); Perhaps the resulting binary value converted elsewhere in your workflow or with copy - paste, or something.

So, at least, your input XML file is created correctly. What remains, that is why he reimport fails to recognize the UTF8 specification in the first line. You can try if adding the code to your routine of reading line solves it.

Tags: InDesign

Similar Questions

  • XML, parsing and adding to the database

    Hello

    I'm parsing an xml file and want to add the items to the database. Basically it works, but only the last element in the xml file is added to the database over and over again (count: M.length).

    I wonder if the loop is too fast and crush the variables and the tx.executeSql (); Gets the last element. Any ideas on that?

    function RSSRequest() {
    
        xmlDoc = loadXMLDoc(RSSBackend);
        var M = xmlDoc.getElementsByTagName("push");
    
        for (i=0;i
    

    When I'm alert (title); I'll get all showing different titles. Any idea and help is appreciated

    Kind regards

    bert2002

    Well I use an anonymous function and works:

    (function(title){
    
    // CODE
    
    })(title);
    
  • How the packet data / * ($HOME /) files by using the bar - descriptor.xml

    Hi, using sdk native c / c ++ with playbook Simulator 1.0

    I want to distribute with my application some data files that likely should fall under the ' data /' ($HOME?)

    folder.

    (I've written / will update them sometimes, so app/native/does not appropriate I suppose.)

    in the bar - descriptor.xml, I tried adding them as an 'active '.

    who drops their bottom right in app/native / *.

    so I change the XML .bar to try to get them grounded in data.

    Here's what I found:

    by train: data/filename landed the file in app/native/data/filename

    try:... /... / Data/filename received the error

    by train: / data/filename received the error (hoping to slash leader was compared to the sandbox)

    I even on a lark tried: $HOME/filename, who literally created file app/native / $HOME!

    so he tried a ${HOME} with the curlies. I got an error saying unable to resolve the path variable.

    How can I get the data files in the folder/data ($HOME) using the .bar packaging?

    You cannot package the file into the data, you copy your files at startup, if they don't not exist your app/native/data for example

  • Documentation for config.xml for playbook

    Hey RIM,.

    When you're you going to get out of the documentation for the file config.xml... all that right with a graphical interface for us in the web plugin eclipse...

    I don't expect the same for the playbook, but really I don't know what should be the content of this file... No documentation would be not good (or if someone could tell me that would be great).

    Right now, I'm just coding in the dark... I do a little better comments about what I think should be allowed in the XML (such as adding other areas...)

    EC

    Here's the documentation you request: technical - grade Configuration Document .

    This document is in the section BlackBerry WebWorks Developer Guides Web site.

    Note: there is at least an inconsistency with the supported elements.  The element ' rim: transitionEffect "is not supported by the SDK WebWorks for PlayBook (but is for the Smartphone SDK).  I have a pending request with our documentation team to provide details on the other gap analysis.

    Sincerely,

    Adam

  • Helps the Parseing XML

    Version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

    Hello

    I need assistance with an XML file to generate lines to insert into a table staged for further processing.

    There is an XML document that is loaded into a table in the database via a Web Service call.

    I need to query this table to get the XML code, loop through it to create folders, with the fields in a specific order and insert records into a table of staging.

    There are two columns that are not in the XML that are added during the process. I am including these tables as well.

    I know it is a bunch of "stuff", but I hope I've provided enough information to get help.

    The tables and insert queries:

    -This table contains the XML of the Web Service call

    CREATE TABLE exam_results
    (
    CLOB results_clob
    );

    INSERT INTO exam_results (results_clob)
    VALUES
    ("< result > < candidate > < ProgramCandidateID > 911221 < / ProgramCandidateID > < LastName > V361208 < / LastName > < FirstName > J361208 < / FirstName > < / candidate > < event > < ended > 1 < / filled > < CompleteDate > 2011 - 08 - 05T 10: 23:42.957 < / CompleteDate > < FormName > SSU11-05 < / FormName > < NumStarts > 2 < / NumStarts > < ProgramRegistrationID > SU0006510JV < / ProgramRegistrationID > < result > 564865 identifier < / result identifier >") < Sponsor > MySponsor < / sponsor > < StartTime > 2011 - 08 - 05T 08: 22:47.877 < / StartTime > < TestName > SSU11 < / TestName > < / Event > < start > < Start > < BrowserVersion > 8.0 < / BrowserVersion > < OperatingSystem > Windows NT 4.0 < / OperatingSystem > < / Start > < / begins > < Scores > < issues > < > < name > 105103 < / name > < SeqDelivered > 1 < / SeqDelivered > < response > 1 < / response > < key > 4 < / key > < seconds > 169.126 < / seconds > < Section > 1 < / Section > < / Question > < Question > < name > 261292 < / name > < SeqDelivered > 2 < / SeqDelivered > < answer > 3 < / response > < key > 3 < / key > < seconds > 97.984 < / seconds > < Section > 1 < / Section > < / Question > < Question > < name > 261241 < / name > < SeqDelivered > 3 < / SeqDelivered > < response > 3 < / response > < key > 3 < / key > < seconds > 87.579 < / seconds > < Section > 1 < / Section > < / Question > < Question > < name > 261451 < / name > < SeqDelivered > 4 < / SeqDelivered > < answer > 3 < / response > < key > 3 < / key > < seconds > 59.983 < / seconds (> < Section > 1 < / section > < / Question > < Question > < name > 264373 < / name > < SeqDelivered > 5 < / SeqDelivered > < response > 5 < / response > < key > 1 < / key > < seconds > 86.346 < / seconds > < Section > 1 < / Section > < / Question > < / Questions > < / Scores > < / result > ');

    -This table is to get 1 of the additional columns that must be included

    CREATE TABLE tracking_id_tbl
    (
    tracking_id NUMBER,
    customer_id NUMBER,
    launch_code VARCHAR2 (11)
    );

    INSERT INTO tracking_id_tbl (tracking_id, customer_id, launch_code)

    VALUES (557,2296267, 'SU0006510JV');

    -This table is to get the other extra column which must be included

    CREATE TABLE school_code_tbl
    (
    customer_id NUMBER,
    nb_id NUMBER,
    organization_id VARCHAR2 (8)
    );

    INSERT INTO school_code_tbl (customer_id, nb_id, organization_id)

    VALUES (2296267,911221, '12');

    -This table will receive the file created from the XML

    CREATE TABLE staging_tbl
    (
    results_data VARCHAR2 (4000)
    );

    To facilitate the XML file to read (we hope) here is a formatted version:

    < result >

    < candidate >

    < ProgramCandidateID > 911221 < / ProgramCandidateID >

    < name > V361208 < / LastName >

    J361208 < FirstName > < / name >

    < / candidate >

    < event >

    < finish > 1 < / completed >

    < completeDate > 2011 - 08 - 05T 10: 23:42.957 < / CompleteDate >

    SSU11-05 < FormName > < / FormName >

    < NumStarts > 2 < / NumStarts >

    < ProgramRegistrationID > SU0006510JV < / ProgramRegistrationID >

    ID of < result > 564865 < / ID results >

    < sponsor > MySponsor < / sponsor >

    < StartTime > 2011 - 08 - 05T 08: 22:47.877 < / StartTime >

    SSU11 < TestName > < / TestName >

    < / event >

    < start >

    < start >

    < > 8.0 BrowserVersion < / BrowserVersion >

    < OperatingSystem > Windows NT 4.0 < / OperatingSystem >

    < / start >

    < / starts >

    < scores >

    < questions >

    < question >

    < name > 105103 < / name >

    < SeqDelivered > 1 < / SeqDelivered >

    < response > 1 < / answer >

    < Key > 4 < / key >

    < seconds > 169.126 < / seconds >

    article <>1 < / Section >

    < / question >

    < question >

    < name > 261292 < / name >

    < SeqDelivered > 2 < / SeqDelivered >

    < response > 3 < / answer >

    < Key > 3 < / key >

    < seconds > 97.984 < / seconds >

    article <>1 < / Section >

    < / question >

    < question >

    < name > 261241 < / name >

    < SeqDelivered > 3 < / SeqDelivered >

    < response > 3 < / answer >

    < Key > 3 < / key >

    < seconds > 87.579 < / seconds >

    article <>1 < / Section >

    < / question >

    < question >

    < name > 261451 < / name >

    < SeqDelivered > 4 < / SeqDelivered >

    < response > 3 < / answer >

    < Key > 3 < / key >

    < seconds > 59.983 < / seconds >

    article <>1 < / Section >

    < / question >

    < question >

    < name > 264373 < / name >

    < SeqDelivered > 5 < / SeqDelivered >

    < response > 5 < / answer >

    < Key > 1 < / key >

    < seconds > 86.346 < / seconds >

    article <>1 < / Section >

    < / question >

    < / questions >

    < / scores >

    < / result >

    This XML file is for 1 card. There are several issues that are in the file. I reduced to only 5 is easier to see.

    The layout of the document to be inserted in the staging table is:

    Event.TestName

    Event.FormName

    Event.CompleteDate

    v_tracking_id

    Event.ProgramRegistrationID

    Event.StartTime

    Event.CompleteDate / * end * /.

    Candidate.LastName

    Candidate.FirstName

    Candidate.MiddleName (the middle name does not exist in the file XML then return null)

    Candidate.ProgramCandidateID

    v_school_code

    Candidate.CustomProperties.Answer (this does not exist in the file XML then return null)

    Event.ResultID

    Event.NumStarts

    Event.Completed

    Event.Sponsor

    Scores.Questions.Question.Name

    Scores.Questions.Question.Section

    Scores.Questions.Question.SeqDelivered

    Scores.Questions.Question.Key

    Scores.Questions.Question.Answer

    Scores.Questions.Question.Seconds

    Starts.OperatingSystem

    Starts.BrowserVersion

    The expected output is:

    INSERT INTO staging_tbl (results_data)
    VALUES ('SSU11,SSU11-05,08/05/2011,557,SU0006510JV,08:22:47,10:23:42,V361208,J361208,,911221,12,,564865,2,1,MySponsor,105103,1,1,4,1,169.126,Windows NT 4.0,8.0");

    INSERT INTO staging_tbl (results_data)
    VALUES ('SSU11,SSU11-05,08/05/2011,557,SU0006510JV,08:22:47,10:23:42,V361208,J361208,,911221,12,,564865,2,1,MySponsor,261292,1,2,3,3,97.984,Windows NT 4.0,8.0");

    INSERT INTO staging_tbl (results_data)
    VALUES ('SSU11,SSU11-05,08/05/2011,557,SU0006510JV,08:22:47,10:23:42,V361208,J361208,,911221,12,,564865,2,1,MySponsor,261241,1,3,3,3,87.579,Windows NT 4.0,8.0");

    INSERT INTO staging_tbl (results_data)
    VALUES ('SSU11,SSU11-05,08/05/2011,557,SU0006510JV,08:22:47,10:23:42,V361208,J361208,,911221,12,,564865,2,1,MySponsor,261451,1,4,3,3,59.983,Windows NT 4.0,8.0");

    INSERT INTO staging_tbl (results_data)
    VALUES ('SSU11,SSU11-05,08/05/2011,557,SU0006510JV,08:22:47,10:23:42,V361208,J361208,,911221,12,,564865,2,1,MySponsor,264373,1,5,1,5,86.346,Windows NT 4.0,8.0");

    The Questions/Question, is what makes a separate line if the values for the other fields would be the same for however many questions is in the XML file.

    That's what I've tried so far:

    DECLARE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             CURSOR get_results_cur
    IS
    SELECT results_clob
    Of exam_results;

    get_results_rec XMLTYPE.
    get_results_clob CLOB.
    NUMBER (38) v_count: = 1;


    v_result VARCHAR2 (32000);
    v_tracking_id tracking_id.tracking_id_tbl%TYPE;
    v_school_code organization_id.school_code_tbl%TYPE;

    BEGIN
    OPEN get_results_cur.
    SEEK get_results_cur INTO get_results_clob;
    CLOSE Get_results_cur;

    get_results_rec: = xmltype.createxml (get_results_clob);

    SELECT tracking_id
    school_code
    IN v_tracking_id
    v_school_code
    OF ti tracking_id_tbl
    JOIN school_code_tbl ON ti.customer_id = sc.customer_id sc
    WHERE ti.launch_code = get_results_rec. EXTRACT ('/ Result/Event/ProgramRegistrationID/text()').getstringval () AND)
    nb_id = get_results_rec. EXTRACT ('/ Result/Candidate/ProgramCandidateID/text()').getstringval ();)

    While get_results_rec. EXISTSNODE ('/ / result [' | v_count |]) ']') = 1
    LOOP
    v_result: =.
    (get_results_rec. EXTRACT ('/ results/event/TestName [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/FormName [' | v_count | / text () ']) .getstringval ())
    || ','
    || ((get_results_rec. EXTRAIT ('/ résultats/événement/CompleteDate [' || v_count || / text () SUBSTR']) .getstringval ()), 1, 10)
    || ','
    || v_tracking_id
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/ProgramRegistrationID [' | v_count | / text () ']) .getstringval ())
    || ','
    || ((get_results_rec. EXTRAIT ('/ résultats/événement/StartTime [' || v_count || / text () SUBSTR']) .getstringval ()), 12.8)
    || ','
    || ((get_results_rec. EXTRAIT ('/ résultats/événement/CompleteDate [' || v_count || / text () SUBSTR']) .getstringval ()), 12.8)
    || ','
    || (get_results_rec. EXTRACT ('/ result/candidate/name [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ result/candidate/name [' | v_count | / text () ']) .getstringval ())
    || ',,'
    || -(get_results_rec. Extract('/result/candidate/MiddleName [' || v_count ||) '] / text () ') .getStringVal ()); ',' ||
    (get_results_rec. EXTRACT ('/ result/candidate/ProgramCandidateID [' | v_count | / text () ']) .getstringval ())
    || ','
    || v_school_code
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/result identifier [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/NumStarts [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/completed [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ results/event/sponsor [' | v_count | / text () ']) .getstringval ());
    || ','

    -Add the results of the first question

    || ','
    || (get_results_rec. EXTRACT ('/ result, departures, Start, OperatingSystem [' | v_count | / text () ']) .getstringval ())
    || ','
    || (get_results_rec. EXTRACT ('/ result, departures, Start, BrowserVersion [' | v_count | / text () ']) .getstringval ());

    v_count: = v_count + 1;

    INSERT INTO staging_tbl (results_data)
    VALUES (v_result);

    END LOOP;
    END;

    What can clear?

    Thank you

    Joe

    You have several questions in the XML, so when flattened document you will have several lines trying to extract in v_result.  Where the error.  You will need to either loop

    for rec in (select... from XMLTable...)

    loop

    insert into staging_tbl...

    end loop;

    or make an insert select

    insert into staging_tbl (results_data)

    Select...

    from XMLTable...

  • Nested for loops EACH in the XML editor

    I have a xml like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <DATA_DS>
         <Line_Approver>
              <getLineNumberAssigneesResponse>
              <result>
                    <LineNumber>1</LineNumber>
                    <Assignees>One</Assignees>
               </result>
              <results>
    
                   <LineNumber>2</LineNumber>
                   <Assignees>Two</Assignees>
              </result>
    
              </getLineNumberAssigneesResponse>
         </Line_Approver>
    <DATA_DS>
         <HEADER>
         <INVOICE_ID>300100071480733</INVOICE_ID>
         <AMOUNT>1111</AMOUNT>
         <INVOICE_CURRENCY_CODE>USD</INVOICE_CURRENCY_CODE>
         <INVOICE_NUM>100</INVOICE_NUM>
         <INVOICE_DATE>2015-11-13T00:00:00.000+05:30</INVOICE_DATE>
         <PAYMENT_CURRENCY_CODE>USD</PAYMENT_CURRENCY_CODE>
         <ORG_ID>204</ORG_ID>
         
         <INVOICELINES>
                  <LINE_NUMBER>1</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>1000</AMOUNT><INVOICE_ID>zzz</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         <INVOICELINES>
              <LINE_NUMBER>2</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>111</AMOUNT><INVOICE_ID>300100071480733</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         </HEADER>
    
    <some more xml/>
    </DATA_DS>
    
    </DATA_DS>
    

    As you can see there are two results and and two invoice lines.

    I want to create a table of invoice lines for which the line number is present in the result.

    So my psudo code is as follows

    for each in result:
         assign result.linenumber to variable
         for each in InvoiceLines:
              compare the InvoiceLines.Line_number to variable:
                   if match print row.
    

    I know I won't have access to the LineNumber result with in second forloop because of the determination of the lexical scope.

    Far from assignment, I am unable to get the value of the number of the line itself.

    I tried two methods of application for with in what work force. The underside of work that uses the absolute path.

    What xpath Miss. Can I do better?

    FOR1: <?for-each:/DATA_DS/Line_Approver/getLineNumberAssigneesResponse/result?>
    
    FOR2: <?for-each:/DATA_DS/DATA_DS/HEADER/INVOICELINES?>
    

    LINE_NUMBER

    LINE_TYPE

    AMOUNT

    For 1 <? LineNumber? > 2 LINE_NUMBER

    LINE_TYPE

    AMOUNT ENDFOR1 ENDFOR2

    I think I gave enough information. Answer just in case I did not say anything clearly.

    You can do this via a simple foreach loop and the code would be

    Please see the data XML and RTF attached for your reference.

    I changed the data in XML format (I added 10 instead of 1) just to make sure that its works or not, and it works very well.

  • LSX-00204 error when validating an XML file on a registered scheme

    Hello

    When I want to validate an XML file against the registered scheme I get the following error:

    ORA-31154: Ungultiges XML-Dokument ORA-19202: Fehler bei XML-Verarbeitung LSX-00204: additional data am Ende von komplexem aufgetreten element

    Here is the schema snippet:

    <! - the address of a given party in fixed or free form possibly the two forms - >

    < xsd: complexType name = 'Subscription_type' xdb:SQLType = "ITX_FTC_ADDRESS_TYPE_O" xdb:maintainDOM = "false" >

    < xsd: annotation >

    < xsd: documentation XML: lang = "fr" >

    The user has the possibility to enter the data concerning the address of a party, either in a single long field or to distribute data on items up to eight or even to use both formats. If the user chooses the option to enter the necessary data in separate elements, the container for this item will be "AddressFix". If the user chooses the option to enter the necessary data in a way less structured in "AddressFree" all the available coordinates must be submitted as a string of bytes, empty or ' / ' (slash) or trolley line break return used as a delimiter between the parts of the address. PLEASE NOTE that the country code address is outside these two elements. The use of the fixed form is recommended as a general rule, to allow an easy match. However, the use of the free form is recommended if the sending State can surely identify and distinguish the different parts of the address. The user wants to use both formats for example if in addition which separates the logical part of the address he also wants to show a decent breakdown in print-lines of delimiters in the form of free text. In this case, "AddressFix" must precede the 'AddressFree '.

    < / xsd: documentation >

    < / xsd: annotation >

    < xsd: SEQUENCE >

    < xsd: element name = "PostalCode" type = "iso: CountryCode_Type ' xdb:SQLName = 'COUNTRY_CODE' / >

    < xsd: Choice >

    < xsd: element name = "AddressFree" type = "xsd: String" xdb:SQLName = "ADDRESS_FREE" / >

    < xsd: SEQUENCE >

    < xsd: element name = "AddressFix" type = "sfa:AddressFix_Type" xdb:SQLName = "ADDRESS_FIX" / >

    < xsd: element name = "AddressFree" type = "xsd: String" minOccurs = "0" xdb:SQLName = "ADDRESS_FREE" / >

    < / xsd: SEQUENCE >

    < / xsd: Choice >

    < / xsd: SEQUENCE >

    < xsd: attribute name = "legalAddressType" type = "stf:OECDLegalAddressType_EnumType" use = "optional" / >

    < / xsd: complexType >

    The problem occurs only when the second choice (when: "AddressFix" and "AddressFree") was given in the XML file. When only the first choice ("AddressFree") gave then the validation against schema very well recorded works.

    I think that the problem is based on the generation of all objects in the database of dbms_xmlschema.registerSchema.

    BTW, how is possible to get a more meaningful error message because the error I get is very common, and I can't imagine in which the problem occurs.

    Thanks in advance.

    Best regards

    Martin

    I have reproduced the issue on 11.2.0.4 using the Schémas XML FATCA.

    declare
    
      l_schemas  sys.odcivarchar2list :=
                sys.odcivarchar2list('isofatcatypes_v1.0.xsd',
                                     'oecdtypes_v4.1.xsd',
                                     'stffatcatypes_v1.1.xsd',
                                     'FatcaXML_v1.1.xsd');
    begin
    
      for i in 1 .. l_schemas.count loop
    
        dbms_xmlschema.registerSchema(
          schemaURL       => l_schemas(i)
        , schemaDoc       => xmltype(bfilename('FATCA_DIR', l_schemas(i)), nls_charset_id('AL32UTF8'))
        , genTypes        => true
        , genTables       => false
        , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
        );
    
      end loop;
    
    end;
    /
    

    As in schema extract that you provided, I've annotated subscription_type complexType with xdb:maintainDOM = "false".

    Then tried to validate the example NilFIReport.xml file after adding an AddressFix element:

    JP

    String

    String

    SQL> declare
      2    doc  xmltype := xmltype(bfilename('FATCA_DIR', 'NilFIReport.xml'), nls_charset_id('AL32UTF8'));
      3  begin
      4    doc.schemaValidate();
      5  end;
      6  /
    declare
    *
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00204: extra data at end of complex element
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at line 4
    

    Now, let's abandon patterns, remove the xdb:maintainDOM annotation (or set to true, the default) and re - register:

    SQL> declare
      2    doc  xmltype := xmltype(bfilename('FATCA_DIR', 'NilFIReport.xml'), nls_charset_id('AL32UTF8'));
      3  begin
      4    doc.schemaValidate();
      5  end;
      6  /
    
    PL/SQL procedure successfully completed.
    

    Works.

    Conclusion: set maintainDOM to false when using XS: Choice.

    There is probably a mess when the positional descriptor (attribute "$SYS_XDBPD") is missing in this case.

  • Add image beside the import XML content

    Dear users of InDesign,

    Importing text in an InDesign template (essentially in a story).

    When I import this XML file do some tweaking with XML-rules, like adding a title.

    function AddHeading() {}

    myIdName = "AddHeading";

    This.XPath = "//phoneno [1];

    This.Apply = function (myElement, myRuleProcessor) {}

    {with (MyElement)}

    var myPhoneNo = myElement.xmlContent;

    myElement.xmlContent.insertionPoints [0] .silence = String ("phone numbers \r'");

    myPhoneNomentioning [0] .appliedParagraphStyle = app.activeDocument.paragraphStyles.item ("HeadingPhoneNo");

    }

    Returns true;

    }

    }

    What I need to do is add an Image (a phone icon) next to the additional title ("phone numbers ').

    Because everything is floating in a story, I can't have the geometric limits for this paragraph.

    Any ideas how to achieve a placement of an image in this context?

    Thank you!

    Thanks to Peter, here is the approach solve my problem:

    (adopted from pkahrel great help in this thread: Re: image of place as anchor object by finding the text...)

    function AddHeading() {}

    myIdName = "AddHeading";

    This.XPath = "//phoneno [1];

    This.Apply = function (myElement, myRuleProcessor) {}

    {with (MyElement)}

    var myPhoneNo = myElement.xmlContent;

    myElement.xmlContent.insertionPoints [0] .silence = String ("phone numbers \r'");

    myPhoneNo.words [0] .appliedParagraphStyle = app.activeDocument.paragraphStyles.item("HeadingPhoneNo");

    var anchor = myElement.storyOffset.textFrames.add ();

    var f = new File('/Users/PATHTOIMAGE/image.png');

    var f = [0,0, "10mm", "10mm"];

    var myObjectStyle = app.activeDocument.objectStyles.item ("HeadingPhoneNo");

    anchor.appliedObjectStyle = myObjectStyle;

    Anchor.contents = myElement.contents;

    anchor.geometricBounds = GB;

    Anchor.place (f);

    Anchor.fit (FitOptions.CONTENT_TO_FRAME);

    }

    Returns true;

    }

    }

  • How can I adapt the decision XML report that comes with a warning event?

    Through the web determinations warning events can be used.

    To make visible warning events in the response following XML must be added to the XML query:

    < typ:show - events > true < / typ:show - events >



    When a warning event is present in the XML response I also get a report of decision with report-style = 'basic attributes.

    When many warning events are present in the output XML file, this has a negative impact on performance.

    It's the reason I'm looking for a possibility to delete or configure the standard decision report that comes with a warning event.

    Is this possible?

    You can make smaller decision reports by setting the "silent" or "Invisible" option on attributes (see 'Hide information in a record of decision' in http://docs.oracle.com/html/E38269_01/toc.htm the political Oracle © modelling User Guide)

    It's really the only option to change the records of decision.

    See you soon
    Frank

  • Help to extract data from XML

    Hello

    We ask a web service via PL/SQL. The XML that is returned seems to have ' & amp; ' Lt; "instead of < and '& amp; GT; "instead of >.

    When I try to draw the values I don't do anything. How can I get the values from this XML file for attributes? Also, how to get the attributes in separate columns?

    Here are the XML, opinion, I added & amp, so you can see what I do when you look in the DB:
    < doSelectResponse xmlns = "http://www.ca.com/UnicenterServicePlus/ServiceDesk" >
    < doSelectReturn xmlns = "" > & amp; Lt;? XML version = & amp; quot; 1.0 & amp; quot; Encoding = & amp; quot; UTF-8 & amp; quot;? & amp; GT;
    & amp; Lt; UDSObjectList & amp; GT;
    & amp; Lt; UDSObject & amp; GT;
    & amp; Lt; Handle & amp; GT; CR:400318 & amp; Lt; / handle & amp; GT;
    & amp; Lt; Attributes & amp; GT;
    & amp; Lt; Attribute DataType = & amp; quot; 2002 & amp; quot; & amp; GT;
    & amp; Lt; AttrName & amp; GT; ref_num & amp; Lt; / AttrName & amp; GT;
    & amp; Lt; AttrValue & amp; GT; 819 & amp; Lt; / AttrValue & amp; GT;
    & amp; Lt; / attribute & amp; GT;
    & amp; Lt; Attribute DataType = & amp; quot; 2002 & amp; quot; & amp; GT;
    & amp; Lt; AttrName & amp; GT; Summary & amp; Lt; / AttrName & amp; GT;
    & amp; Lt; AttrValue & amp; GT; Can you please put this circuit on the Tberd and see if there is any mistakes & amp; Lt; / AttrValue & amp; GT;
    & amp; Lt; / attribute & amp; GT;
    & amp; Lt; / attributes & amp; GT;
    & amp; Lt; / UDSObject & amp; GT;
    & amp; Lt; / UDSObjectList & amp; GT;
    < / doSelectReturn >
    < / doSelectResponse >
    I threw the XML in a clob, and trying to get the AttrValue like this:
    SELECT ID, clob001
          ,XMLTYPE.createxml(c.clob001).extract('//AttrValue/text()','xmlns=""').getStringVal() val
      FROM jlb_tmp c
    We are on 9.2.0.6 version of the DB, the upgrade to 11g soon, but not before I have to get this to work.

    Thanks in advance for your help,
    -Johnnie

    Published by: johnniebillings on March 30, 2011 17:35

    Published by: johnniebillings on March 30, 2011 19:51

    If someone could explain it, I'd be happy.

    Short answer: bug.

    Oracle 9i is known to have bugs about the handling of XML, especially when using namespaces. Also note that 9i was not yet fully compliant W3C.
    You have circumvented the problem by using a shaft going down in the XPath expression, so without going through the selection of the root node labelled by a space.

  • Set the property to an XML string

    Hi all

    An another newbie question, sorry. I'm trying to set a certain XML attribute before adding it to a dataprovider of datagrid without too much luck. Here is the code I'm working on that does not work:

    var newType:XML = < type_equipement

    equip_type_id =""

    equip_manufacturer_id =""

    STR_NAME = "Click to add a new type" / >


    newType.attribute ('equip_manufacturer_id') = dgMfg.selectedItem.@equip_manufacturer_id;
    dgType.dataProvider.addItem (newType);

    Basically, I'm defining the Mfgid before it is added to the grid type. I mean, it's "Target of assignment must be a reference value".

    Any ideas?

    Thank you

    Rick

    attribute() returns an attribute and cannot be used to define an attribute.

    Use .@myattribute.

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

    
    
      
        
              
              
            ;
          private var xml2:XML =
            
              
              
            ;
    
          [Bindable] private var xlc:XMLListCollection;
          [Bindable] private var xlc2:XMLListCollection;
    
          private function init():void{
            xlc = new XMLListCollection(xml..equipment_type);
            xlc2 = new XMLListCollection(xml2..equipment_type);
          }
    
          private function addNew():void{
            var newType:XML = 
            newType.@equip_manufacturer_id = dgMfg.selectedItem.@equip_manufacturer_id;
            dgType.dataProvider.addItem(newType);
          }
        ]]>
      
      
      
        
          
        
      
    
    
  • NI 9144 EtherCAT and part NI 9213 using 3rd EtherCAT master settings

    I want to change a setting (the setting of the speed) on the 9213 when using the EtherCAT 9144 module. I use a 3rd party EtherCAT master.  I can use an EtherCAT configuration tool to change the speed setting.  I want the 9144 9213 material to always start with this mode (default).

    My questions are:

    1. This setting of the speed in the 9213 be saved?  If Yes, where?

    2. This speed setting get recorded in the EtherCAT ENI file?

    3. Or do I have to send specific configuration commands via the Council of Europe whenever I initialize the EtherCAT using the master of the 3 rd-party?

    Thank you

    It is a sequel to my previous post.

    The XML above, when adding to the file EtherCAT ENI, will correctly set the speed controller. I tested on a 9213.

    If you are using a master of EtherCAT 3 rd-party with 9144 modules, you will need to connect to some form of EtherCAT configuration tool to generate the EtherCAT ENI file.  The configuration tool will be an option to add startup commands in the file of ENI. These product start additional xml commands I listed above.

  • Rename a custom device

    Hi all

    I made a custom device that perform some operations with the associated DAQ card.

    In the Solution Explorer system Veristand, to manage several boards, it is possible to add multiple instances of it. The name of each instance must match the associated with a DAQ card, he is asked once and is never changes (in the camera custom XML file, I added the entry 'true').

    Demand for the name is made just after the addition of the instance in the tree Explorer (right click on the entry "Custom devices") system. In particular, the name is invited to call a VI that I put in the "Initialization.VI" of the library of device configuration custom. Unfortunately, this approach I am not able to change the name because ot the property of DisallowRenaming and an error is raised.

    How can I work around this problem? Is there an event as described in the "Custom Device" Guide (OnDelete, OnLoad,...) which can be pulled before the call of the "Initialization.VI", but after the addition of the instance in the system Explorer tree?

    Thank you

    aRCo

    I recommend to remove this label of your item custom main device. its best practice to rename the custom feature set.

    In addition, you can store the name of the physical device as a separate property rather than use the custom device node name.

    Finally, in 2012, we have added a "force rename" bool entry to the item to rename API to work around this problem.

  • XControl not keeping pace

    Hello

    I'm trying to use an Xcontrol to do a graphical indicator with a few more features than the chart base in Labview (as the automatic label scale X update and there, turning off autoscaling when the user zooms in on the chart... updated such things)

    The problem I am facing right now is that if I send data very quickly to the Xcontrol, he bufferize all this 'change data' event and treat them fairly slowly. I find myself with an Xcontrol who still works although hosting vi is stopped! In this case, my chart is always updated while hosting vi is stopped.

    How can I avoid this problem?

    I'm new to the Xcontrol so maybe I did do a few rookie mistakes! Here is the code of my front vi:

    I made a small slot - VI dealing with the manipulation of data, the structure of the event, just send 'actions' to this vi.

    What is a good idea to use some sort of structure of producer/consumer, with a tail with loss of an element, in the façade of vi?

    In general, where can I find resources and good tutorials on Xcontrols?

    Thanks in advance,

    Peper

    I had exactly this problem in the past.  It is known and it is not really due to fix anytime soon.

    You can ease the pain a bit by directly modifying the XControl xml file and adding the line

    true

    Photo courtesy a post HERE.

    Even if this is not the problem, it will alleviate much of the aqssociated of headache with it.

    Please go HERE and vote for my idea fix this behavior once and for all.  Apparently the graphics NOR the same behavior, but the problem is with XControls that time individual loop can get VERY slow depending on what is done.

    Shane.

  • Not able to connect to a remote Wcf service

    I am trying to connect to a wcf service hosted on a server using this code

    function {} Getresults()

    var XMLHTTP;
    If (! xmlhttp & typeof XMLHttpRequest! = 'undefined') {}

    try {}

    XMLHTTP = new XMLHttpRequest();                }

    {} catch (e)

    XMLHTTP = false;

    }

    }
    return xmlhttp;

    }

    function getDynamicData() {}

    var url = "http://xx.x.10.246/Service.Wcf/ReportsService.svc/Volume";

    XMLHTTP.open("get",URL,true) ("GET", url, true);

    xmlHttp.onreadystatechange = callbackFunction;

    xmlHttp.setRequestHeader (Content-Type "," text/xml; charset = utf-8 "");

    xmlHttp.send (null);

    }

    function callbackFunction() {}

    Alert (XMLHTTP. ReadyState);

    If (xmlHttp.readyState! = 4)

    return;

    Alert (XMLHTTP. Status);

    Alert (XMLHTTP. StatusText);

    Alert (XMLHTTP. ResponseText);

    }

    I always get the alert as 400 Bad request message, but the expected response is xml. I added it in the field. I am able to call the service, but not the function in the service and the function exists.  Could someone help me with this?

    Yes, I have listed it in the field. I found the problem that I was sending the incorrect soap request. But thanks for the solution.

Maybe you are looking for