XML file too long

Hi all,
I have the following problem regarding XML file.
I generate an XML file with following steps:
1) Populate an internal table;
2) Transform the internal table into an xml xstring variable, using CALL TRANSFORMATION command;
3) Write a file in binary mode (Open/Tansfer/Close).
The file produced is ok but if I open it with notepad, all the xml is written in one line.
Is there a way to write the file in more than one line?
Best Regards,
Raffaele

Hi,
You have to use a carriage return statement(^M) at the end of each line in ABAP to produce the file correctly this will help you to split the file in multiple lines rather than a single line in the Notepad. Also when you will open this in the notepad you can visualize the same format in comparision when youopen it in IE/Wordpad.
Hope this carifies you queries.
Cheers,
Jay

Similar Messages

  • Rep-0530 file too long

    hi,
    i have a query 78617 characters and 1754 lines. in a file it is about 80-84 kb.
    if i paste this query on report builder wizard then only a part of this query is pasted..
    if i select the option import query then it displays error as rep-0530 file too long. it will be truncated to fit.
    is there any limit for query size in reports.. same query runs fine in sqlplus,toad.
    regards,
    Avinash

    Hello,
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwcontxt/props/pi_sql_query_statement.htm
    Value
    A valid SELECT statement not to exceed 64K.
    Regards

  • XML file too large or XML element too large

    I am attempting to import an xml file into the repository and have it shred into the object-relational tables. I registered a schema and it created object-relational xml_tables, triggers, and types. The full xml file is > 80MB. XDB created all the fields as VARCHAR2(4000).
    error code when importing the full XML file. This is what I need to ultimately fix.
    DECLARE
      res BOOLEAN;
    BEGIN
      res := DBMS_XDB.createResource('/home/pharma/drugbank.xml',
                    bfilename('XMLPHARMA', 'drugbank.xml'),
                    nls_charset_id('AL32UTF8'));
    END;
    COMMIT;
    XML file encounters errors on the import.
    An error was encountered performing the requested operation
    ORA-30951: Element or attribute at Xpath references exceeds maximum length
    ORA-06512 at "XDB.DBMS_XDB", line 315
    ORA-06512 at line 4
    30951.00000 - "Element or attribute at Xpath %x exceeds maximum length"
    *Cause: An attempt was made to insert a node of length exceeding the maximum length (specified by the maxLength facet) into an XML document.
    *Action: Do not attempt to add a node exceeding the maximum length to XML documents.
    Vendor code 30951Error at Line:18I would guess that some of the fields have max lengths > 4000. I plan to annotate the schema with SQLType="CLOB", but need to know which fields to change. I was able to copy the xml file and reduce that xml file to one record, which imported into the tables. My plan was to write a view over the bfile to get the lengths of certain fields, annotate the .xsd with CLOBS where needed, and then import again. In order to do that, I have a 1 record file imported into a table and as a bfile.
    Here is my code selecting length from a generated object-relational table of only one record.
    CREATE OR REPLACE VIEW pharma.drugs_vw AS
    SELECT d.*
    FROM drugs, XMLTABLE
      ('/drugs' PASSING OBJECT_VALUE COLUMNS
        drugbank_id        VARCHAR2(20)   PATH 'drug/drugbank-id',
        name               VARCHAR2(50)   PATH 'drug/name',
        description        VARCHAR2(4000) PATH 'drug/description'   
      ) d
    select max(length(drugbank_id)) as dbidlen,
          max(length(name)) as nmlen,
          max(length(description)) as desclen
    from drugs_vw;
            DBIDLEN           NMLEN         DESCLEN
                  7               9             229
    1 row selected.Here is the code for the bfile. Same results, but using deprecated functions. I read the whitepaper, Oracle XML DB: Best practices to get optimal performance out of XML Queries. It says that extract(), extractvalue(), Table(XMLSequence()), and XMLType() are deprecated in 11gr2.
    -- Note extractvalue is deprecated in 11gr2 replaced by W3C standard
    --                                          XMLCast(XMLQuery())
    -- TABLE(XMLSequence) is replaced by XMLTable
    -- XMLType() is replaced by XMLParse()
    SELECT max(length(extractvalue(column_value, '/drug/drugbank-id'))) dbidlen,
           max(length(extractvalue(column_value, '/drug/name'))) nmlen,
           max(length(extractvalue(column_value, '/drug/description'))) desclen
    FROM TABLE(XMLSequence(XMLTYPE(bfilename('XMLPHARMA',
    'db00001.xml'),nls_charset_id('AL32UTF8')).extract('/drugs/drug'))) d
    WHERE ROWNUM <= 5;
            DBIDLEN           NMLEN         DESCLEN
                  7               9             229Is this better code for getting the maximum length of xml fields from a bfile? Here is what I have so far. This works on a single drugbank-id.
    SELECT max(length(drugbank_id)) AS dbidlen,
           max(length(name)) AS nmlen,
           max(length(description)) AS desclen
    FROM (XMLTABLE('*'
                    PASSING (XMLType(bfilename('XMLPHARMA', 'db00001.xml'),nls_charset_id('AL32UTF8')))
                    COLUMNS
        drugbank_id        VARCHAR2(20)   PATH 'drug/drugbank-id',
        name               VARCHAR2(50)   PATH 'drug/name',
        description        VARCHAR2(4000) PATH 'drug/description'
    );I try to run it on the full file and get this error
    Error report:
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.The code to create schema and object-relational tables. This worked fine.
    set serveroutput on
    -- Create resource file for schema
    DECLARE
      res BOOLEAN;
    BEGIN
      res := DBMS_XDB.createResource('/home/pharma/drugbank.xsd',
                    bfilename('XMLPHARMA', 'drugbank.xsd'),
                    nls_charset_id('AL32UTF8'));
      COMMIT;
    END;
    -- optional debugging of create types and tables if you want a trace
    ALTER SESSION SET EVENTS = '31098 TRACE NAME CONTEXT FOREVER';
    BEGIN
      DBMS_XMLSCHEMA.registerSchema(
          SCHEMAURL => 'http://localhost:8080/home/pharma/drugbank.xsd',
          SCHEMADOC => bfilename('XMLPHARMA', 'drugbank.xsd'),
          CSID      => nls_charset_id('AL32UTF8'),
          LOCAL     => TRUE,
          GENTYPES  => TRUE,
          GENTABLES => TRUE,
          OWNER     => 'PHARMA');
      COMMIT;
    END;
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionThe xml schema follows. Sorry about the length, but I think I might break something if I snipped it.
    <?xml version="1.0" encoding="UTF-8"?>
         <xs:schema 
         xmlns:xs="http://www.w3.org/2001/XMLSchema" 
         xmlns:xdb="http://xmlns.oracle.com/xdb"
         >
         <!-- General type definitions -->
         <xs:simpleType name="DecimalOrEmptyType">
              <xs:union memberTypes="xs:decimal EmptyStringType"/>
         </xs:simpleType>
         <xs:simpleType name="EmptyStringType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <!-- Element Definitions -->
         <!-- Drug secondary accession number definition begins -->
         <xs:element name="secondary-accession-numbers" xdb:defaultTable="SECONDARY_ACCESSION_NUMBERS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="secondary-accession-number" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug secondary accession number definition ends -->
         <!-- Drug groups definition begins -->
         <xs:element name="groups" xdb:defaultTable="GROUPS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="group">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="approved"/>
                                       <xs:enumeration value="illicit"/>
                                       <xs:enumeration value="experimental"/>
                                       <xs:enumeration value="withdrawn"/>
                                       <xs:enumeration value="nutraceutical"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug groups definition ends -->
         <!-- Drug taxonomy definition begins -->
         <xs:element name="substructure">
              <xs:complexType>
                   <xs:simpleContent>
                        <xs:extension base="xs:string">
                             <xs:attribute name="class" type="xs:string" use="required"/>
                        </xs:extension>
                   </xs:simpleContent>
              </xs:complexType>
         </xs:element>
         <xs:element name="substructures" xdb:defaultTable="SUBSTRUCTURES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="substructure"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="taxonomy" xdb:defaultTable="TAXONOMY">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="kingdom" type="xs:string"/>
                        <xs:element ref="substructures"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug taxonomy definition ends -->
         <!-- Drug brands definition begins -->
         <xs:element name="brands" xdb:defaultTable="BRANDS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="brand" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug brands definition ends -->
         <!-- Drug mixtures definition begins -->
         <xs:element name="mixture">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                        <xs:element name="ingredients" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="mixtures" xdb:defaultTable="MIXTURES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="mixture"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug mixtures definition ends -->
         <!-- Drug packagers definition begins -->
         <xs:element name="packager">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                        <xs:element name="url" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="packagers" xdb:defaultTable="PACKAGERS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="packager"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug packagers definition ends -->
         <!-- Drug manufacturers definition begins -->
         <xs:element name="manufacturer">
              <xs:complexType>
                   <xs:simpleContent>
                        <xs:extension base="xs:string">
                             <xs:attribute name="generic" type="xs:string" use="required"/>
                        </xs:extension>
                   </xs:simpleContent>
              </xs:complexType>
         </xs:element>
         <xs:element name="manufacturers" xdb:defaultTable="MANUFACTURERS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="manufacturer"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug manufactures definition ends -->
         <!-- Drug pricing definition begins -->
         <xs:element name="cost">
              <xs:complexType>
                   <xs:simpleContent>
                        <xs:extension base="xs:string">
                             <xs:attribute name="currency" type="xs:string" use="required"/>
                        </xs:extension>
                   </xs:simpleContent>
              </xs:complexType>
         </xs:element>
         <xs:element name="price">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="description" type="xs:string"/>
                        <xs:element ref="cost"/>
                        <xs:element name="unit" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="prices" xdb:defaultTable="PRICES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="price"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug pricing definition ends -->
         <!-- Drug categories definition begins -->
         <xs:element name="categories" xdb:defaultTable="CATEGORIES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="category" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug categories definition ends -->
         <!-- Drug affected orgainsms definition begins -->
         <xs:element name="affected-organisms" xdb:defaultTable="AFFECTED_ORGANISMS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="affected-organism" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug affected organisms definition ends -->
         <!-- Drug dosage definition begins -->
         <xs:element name="dosage">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="form" type="xs:string"/>
                        <xs:element name="route" type="xs:string"/>
                        <xs:element name="strength" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="dosages" xdb:defaultTable="DOSAGES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="dosage"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug dosages definition ends -->
         <!-- Drug ATC codes definition begins -->
         <xs:element name="atc-codes" xdb:defaultTable="ATC_CODES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="atc-code" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug ATC codes definition ends -->
         <!-- Drug AHFS codes definition begins -->
         <xs:element name="ahfs-codes" xdb:defaultTable="AHFS_CODES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="ahfs-code" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug AHFS codes definition ends -->
         <!-- Drug Patent definition begins -->
         <xs:element name="patent">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="number" type="xs:string"/>
                        <xs:element name="country" type="xs:string"/>
                        <xs:element name="approved" type="xs:string"/>
                        <xs:element name="expires" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="patents" xdb:defaultTable="PATENTS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="patent"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug patent definition ends -->
         <!-- Drug food interactions definition begins -->
         <xs:element name="food-interactions" xdb:defaultTable="FOOD_INTERACTIONS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="food-interaction" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug food interactions definition ends -->
         <!-- Drug drug interactions definition begins -->
         <xs:element name="drug-interaction">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="drug" type="xs:integer"/>
                        <xs:element name="description" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="drug-interactions" xdb:defaultTable="DRUG_INTERACTIONS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="drug-interaction"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug drug interactions definition ends -->
         <!-- Drug protein sequences (biotech) definition begins -->
         <xs:element name="protein-sequences" xdb:defaultTable="PROTEIN_SEQUENCES">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element name="protein-sequence" type="SequenceType"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug protein sequences (biotech) definition ends-->
         <!-- Drug external links definition begins -->
         <xs:element name="external-link">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="resource" type="xs:string"/>
                        <xs:element name="url" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="external-links" xdb:defaultTable="EXTERNAL_LINKS">
              <xs:complexType>
                   <xs:sequence maxOccurs="unbounded" minOccurs="0">
                        <xs:element ref="external-link"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug external links definition ends -->
         <!-- Drug targets definition begins -->
         <xs:element name="targets" xdb:defaultTable="TARGETS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="target" type="TargetBondType" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug targets definition ends -->
         <!-- Drug enzymes definition begins -->
         <xs:element name="enzymes" xdb:defaultTable="ENZYMES">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="enzyme" type="BondType" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug enzmes definition ends -->
         <!-- Drug transporters definition begins -->
         <xs:element name="transporters" xdb:defaultTable="TRANSPORTERS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="transporter" type="BondType" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug transporters definition ends -->
         <!-- Drug carriers definition begins -->
         <xs:element name="carriers" xdb:defaultTable="CARRIERS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="carrier" type="BondType" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Drug carriers definition ends -->
         <!-- Partner  Pfams definition begins -->
         <xs:element name="pfam">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="identifier" type="xs:string"/>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="pfams" xdb:defaultTable="PFAMS">
              <xs:complexType>
                   <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="pfam"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Partner  Pfams definition end -->
         <!-- Partner  GO Classification definition begins -->
         <xs:element name="go-classifier">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="category" type="xs:string"/>
                        <xs:element name="description" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="go-classifiers" xdb:defaultTable="GO_CLASSIFIERS">
              <xs:complexType>
                   <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="go-classifier"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Partner  GO Classification definition ends -->
         <!-- Partner Essentiality definition begins -->
         <xs:element name="essentiality">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="Essential"/>
                        <xs:enumeration value="Non-Essential"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <!-- Partner Essentiality definition ends -->
         <!-- Complex Type Definitions -->
         <xs:complexType name="SequenceType">
              <xs:sequence>
                   <xs:element name="header" type="xs:string"/>
                   <xs:element name="chain" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="PropertyType">
              <xs:sequence>
                   <xs:element name="kind">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="logP"/>
                                  <xs:enumeration value="logS"/>
                                  <xs:enumeration value="logP/hydrophobicity"/>
                                  <xs:enumeration value="Water Solubility"/>
                                  <xs:enumeration value="caco2 Permeability"/>
                                  <xs:enumeration value="pKa"/>
                                  <xs:enumeration value="IUPAC Name"/>
                                  <xs:enumeration value="Molecular Weight"/>
                                  <xs:enumeration value="Monoisotopic Weight"/>
                                  <xs:enumeration value="SMILES"/>
                                  <xs:enumeration value="Molecular Formula"/>
                                  <xs:enumeration value="InChI"/>
                                  <xs:enumeration value="InChIKey"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="value" type="xs:string"/>
                   <xs:element name="source">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="JChem"/>
                                  <xs:enumeration value="ALOGPS"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="PropertiesType">
              <xs:sequence>
                   <xs:element name="property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="SynonymsType">
              <xs:sequence maxOccurs="unbounded" minOccurs="0">
                   <xs:element name="synonym" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="IdentifiersType">
              <xs:sequence maxOccurs="unbounded" minOccurs="0">
                   <xs:element name="external-identifier">
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="resource" type="xs:string"/>
                                  <xs:element name="identifier" type="xs:string"/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="BondActionsType">
              <xs:sequence maxOccurs="unbounded" minOccurs="0">
                   <xs:element name="action" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="BondType">
              <xs:sequence>
                   <xs:element name="actions" type="BondActionsType"/>
                   <xs:element name="references" type="xs:string"/>
              </xs:sequence>
              <xs:attribute name="position" type="xs:integer" use="optional"/>
              <xs:attribute name="partner" type="xs:integer"/>
         </xs:complexType>
         <xs:complexType name="TargetBondType">
              <xs:complexContent>
                   <xs:extension base="BondType">
                        <xs:sequence>
                             <xs:element name="known-action">
                                  <xs:simpleType>
                                       <xs:restriction base="xs:string">
                                            <xs:enumeration value="yes"/>
                                            <xs:enumeration value="no"/>
                                            <xs:enumeration value="unknown"/>
                                       </xs:restriction>
                                  </xs:simpleType>
                             </xs:element>
                        </xs:sequence>
                   </xs:extension>
              </xs:complexContent>
         </xs:complexType>
         <xs:complexType name="PartnerType">
              <xs:sequence>
                   <xs:element name="name" type="xs:string"/>
                   <xs:element name="general-function" type="xs:string"/>
                   <xs:element name="specific-function" type="xs:string"/>
                   <xs:element name="gene-name" type="xs:string"/>
                   <xs:element name="locus" type="xs:string"/>
                   <xs:element name="reaction" type="xs:string"/>
                   <xs:element name="signals" type="xs:string"/>
                   <xs:element name="cellular-location" type="xs:string"/>
                   <xs:element name="transmembrane-regions" type="xs:string"/>
                   <xs:element name="theoretical-pi" type="DecimalOrEmptyType"/>
                   <xs:element name="molecular-weight" type="DecimalOrEmptyType"/>
                   <xs:element name="chromosome" type="xs:string"/>
                   <xs:element ref="essentiality"/>
                   <xs:element name="references" type="xs:string"/>
                   <xs:element name="external-identifiers" type="IdentifiersType"/>
                   <xs:element name="synonyms" type="SynonymsType"/>
                   <xs:element name="protein-sequence" type="SequenceType" minOccurs="0"/>
                   <xs:element name="gene-sequence" type="SequenceType" minOccurs="0"/>
                   <xs:element ref="pfams"/>
                   <xs:element ref="go-classifiers"/>
              </xs:sequence>
              <xs:attribute name="id" type="xs:integer" use="required"/>
         </xs:complexType>
         <xs:complexType name="DrugType">
              <xs:sequence>
                   <xs:element name="drugbank-id" type="xs:string"/>
                   <xs:element name="name" type="xs:string"/>
                   <xs:element name="description" type="xs:string"/>
                   <xs:element name="cas-number" type="xs:string"/>
                   <xs:element name="general-references" type="xs:string"/>
                   <xs:element name="synthesis-reference" type="xs:string"/>
                   <xs:element name="indication" type="xs:string"/>
                   <xs:element name="pharmacology" type="xs:string"/>
                   <xs:element name="mechanism-of-action" type="xs:string"/>
                   <xs:element name="toxicity" type="xs:string"/>
                   <xs:element name="biotransformation" type="xs:string"/>
                   <xs:element name="absorption" type="xs:string"/>
                   <xs:element name="half-life" type="xs:string"/>
                   <xs:element name="protein-binding" type="xs:string"/>
                   <xs:element name="route-of-elimination" type="xs:string"/>
                   <xs:element name="volume-of-distribution" type="xs:string"/>
                   <xs:element name="clearance" type="xs:string"/>
                   <xs:element ref="secondary-accession-numbers"/>
                   <xs:element ref="groups"/>
                   <xs:element ref="taxonomy"/>
                   <xs:element name="synonyms" type="SynonymsType"/>
                   <xs:element ref="brands"/>
                   <xs:element ref="mixtures"/>
                   <xs:element ref="packagers"/>
                   <xs:element ref="manufacturers"/>
                   <xs:element ref="prices"/>
                   <xs:element ref="categories"/>
                   <xs:element ref="affected-organisms"/>
                   <xs:element ref="dosages"/>
                   <xs:element ref="atc-codes"/>
                   <xs:element ref="ahfs-codes"/>
                   <xs:element ref="patents"/>
                   <xs:element ref="food-interactions"/>
                   <xs:element ref="drug-interactions"/>
                   <xs:element ref="protein-sequences" minOccurs="0"/><!-- Only present for biotech drugs -->
                   <xs:element name="calculated-properties" type="PropertiesType" minOccurs="0"/><!-- Only present for small molecule drugs -->
                   <xs:element name="experimental-properties" type="PropertiesType"/>
                   <xs:element name="external-identifiers" type="IdentifiersType"/>
                   <xs:element ref="external-links"/>
                   <xs:element ref="targets"/>
                   <xs:element ref="enzymes"/>
                   <xs:element ref="transporters"/>
                   <xs:element ref="carriers"/>
              </xs:sequence>
              <xs:attribute name="type" use="required">
                   <xs:simpleType>
                        <xs:restriction base="xs:string">
                             <xs:enumeration value="small molecule"/>
                             <xs:enumeration value="biotech"/>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:attribute>
              <xs:attribute name="updated" type="xs:string" use="required"/>
              <xs:attribute name="created" type="xs:string" use="required"/>
              <xs:attribute name="version" type="xs:decimal" use="required"/>
         </xs:complexType>
         <xs:element name="drugs"  xdb:defaultTable="DRUGS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="drug" type="DrugType" minOccurs="0" maxOccurs="unbounded" />
                        <xs:element name="partners">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="partner" type="PartnerType" minOccurs="0" maxOccurs="unbounded" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
              <xs:keyref name="targetPartnerIdKeyRef" refer="partnerIdKey">
                   <xs:selector xpath="drug/targets/*"/>
                   <xs:field xpath="@partner"/>
              </xs:keyref>
              <xs:keyref name="enzymePartnerIdKeyRef" refer="partnerIdKey">
                   <xs:selector xpath="drug/enzymes/*"/>
                   <xs:field xpath="@partner"/>
              </xs:keyref>
              <xs:keyref name="transporterPartnerIdKeyRef" refer="partnerIdKey">
                   <xs:selector xpath="drug/transporters/*"/>
                   <xs:field xpath="@partner"/>
              </xs:keyref>
              <xs:keyref name="carrierPartnerIdKeyRef" refer="partnerIdKey">
                   <xs:selector xpath="drug/carriers/*"/>
                   <xs:field xpath="@partner"/>
              </xs:keyref>
              <xs:key name="partnerIdKey">
                   <xs:selector xpath=".//partner"/>
                   <xs:field xpath="@id"/>
              </xs:key>
         </xs:element>     
    </xs:schema>Query optimizing whitepaper
    http://www.oracle.com/technetwork/database/features/xmldb/xmlqueryoptimize11gr2-168036.pdf

    I attempted to insert the xml file into an xml table and into a relational table with an xml column both based on the schema. I get the same errors.
    -This creates an XML table based on the schema successfully
    CREATE TABLE pharma.drugs_xmltype OF XMLTYPE
    XMLSCHEMA "http://localhost:8080/home/pharma/drugbank.xsd"
    ELEMENT "drugs";
    Table created.
    Elapsed: 00:00:02.67
    SQL>desc pharma.drugs_xmltype
    Name                                                                          Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://localhost:8080/home/pharma/drugbank.xsd" Element "drugs") STORAGE Object-relational TYPE "drugs1200_T"-- it refers to these types
    create or replace TYPE          "drugs1200_T" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","drug" "drug1201_COLL","partners" "partners1202_T")FINAL INSTANTIABLE
    create or replace TYPE          "drug1201_COLL" AS VARRAY(2147483647) OF "DrugType1121_T"
    create or replace TYPE          "partners1202_T" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","partner" "partner1203_COLL")FINAL INSTANTIABLE
    create or replace TYPE          "partner1203_COLL" AS VARRAY(2147483647) OF "PartnerType1190_T"
    create or replace TYPE          "DrugType1121_T" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","type" "XDB"."XDB$ENUM_T","updated" VARCHAR2(4000 CHAR),"created" VARCHAR2(4000 CHAR),"version" NUMBER,"drugbank-id" VARCHAR2(4000 CHAR),"name" VARCHAR2(4000 CHAR),"description" VARCHAR2(4000 CHAR),"cas-number" VARCHAR2(4000 CHAR),"general-references" VARCHAR2(4000 CHAR),"synthesis-reference" VARCHAR2(4000 CHAR),"indication" VARCHAR2(4000 CHAR),"pharmacology" VARCHAR2(4000 CHAR),"mechanism-of-action" VARCHAR2(4000 CHAR),"toxicity" VARCHAR2(4000 CHAR),"biotransformation" VARCHAR2(4000 CHAR),"absorption" VARCHAR2(4000 CHAR),"half-life" VARCHAR2(4000 CHAR),"protein-binding" VARCHAR2(4000 CHAR),"route-of-elimination" VARCHAR2(4000 CHAR),"volume-of-distribution" VARCHAR2(4000 CHAR),"clearance" VARCHAR2(4000 CHAR),"secondary-accession-numbers" "secondary-accession1122_T","groups" "groups1124_T","taxonomy" "taxonomy1126_T","synonyms" "SynonymsType1131_T","brands" "brands1132_T","mixtures" "mixtures1133_T","packagers" "packagers1137_T","manufacturers" "manufacturers1141_T","prices" "prices1145_T","categories" "categories1151_T","affected-organisms" "affected-organisms1152_T","dosages" "dosages1153_T","atc-codes" "atc-codes1157_T","ahfs-codes" "ahfs-codes1158_T","patents" "patents1159_T","food-interactions" "food-interactions1163_T","drug-interactions" "drug-interactions1164_T","protein-sequences" "protein-sequences1168_T","calculated-properties" "PropertiesType1171_T","experimental-properties" "PropertiesType1171_T","external-identifiers" "IdentifiersType1174_T","external-links" "external-links1177_T","targets" "targets1181_T","enzymes" "enzymes1186_T","transporters" "transporters1188_T","carriers" "carriers1189_T")NOT FINAL INSTANTIABLE -- drugs type
    PHARMA@scidev> desc "drugs1200_T"
    Name          Null?    Type
    SYS_XDBPD$             XDB.XDB$RAW_LIST_T
    drug                   drug1201_COLL
    partners               partners1202_T-- I planned to insert using a subselect and got the same error on the select.
    Error starting at line 1 in command:
    SELECT max(length(drugbank_id)) AS dbidlen
    FROM (XMLTABLE('*'
                    PASSING (XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')))
                    COLUMNS
        drugbank_id        VARCHAR2(20)   PATH 'drug/drugbank-id'
    Error report:
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.--This creates a row in the xmltype table from a single drug file.
    INSERT INTO drugs_xmltype
    VALUES(XMLType(bfilename('XMLPHARMA', 'db00001.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
        'http://localhost:8080/home/pharma/drugbank.xsd'))
    ;-- The create using the full xml file fails.
    INSERT INTO drugs_xmltype
    VALUES(XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
    'http://localhost:8080/home/pharma/drugbank.xsd'))
    VALUES(XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
    ERROR at line 2:
    ORA-30951: Element or attribute at Xpath references exceeds maximum length
    Elapsed: 00:01:17.90-- Then I tried the same using a relational table with an xml column
    -- Then I created a relational table with an xml column
    CREATE TABLE pharma.drugs_xmlcolumn_type (drug_xml XMLTYPE)
    XMLTYPE COLUMN drug_xml STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://localhost:8080/home/pharma/drugbank.xsd"
    ELEMENT "drugs";
    CREATE TABLE succeeded.--This command refers to the following types
    SYS.XMLTYPE(XMLSchema "http://localhost:8080/home/pharma/drugbank.xsd" Element "drugs" ) STORAGE Object-relational TYPE "drugs1200_T"-- This creates a row in the xmlcolumn table from a single drug file.
    INSERT INTO drugs_xmlcolumn_type
    VALUES(XMLType(bfilename('XMLPHARMA', 'db00001.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
        'http://localhost:8080/home/pharma/drugbank.xsd'))
    ;--The create using the full xml file into a relational table with an xml column fails
    INSERT INTO drugs_xmlcolumn_type
    VALUES(XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
    'http://localhost:8080/home/pharma/drugbank.xsd'))
    VALUES(XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')).CreateSchemaBasedXML(
    ERROR at line 2:
    ORA-30951: Element or attribute at Xpath references exceeds maximum length
    Elapsed: 00:01:06.74

  • Perfectly good XML file no longer updating in iTunes

    Hey there, forum.
    Ok, so I have this podcast that has sucessfully updated 36 or so times, I've never had a problem until now.
    The podcast XML file is updating just like it has been, and and I can go to http://www.imboredpictures.com/e78podcastfeed.xml and verify this. Episodes 1-37 show up just fine. But my most recent update (which has been posted for over 2 weeks) does not show up - either on the itunes store or when I select the "Update Podcast" command in my subscriptions. Users are also unable to subscribe to the podcast using the "Subscribe to Podcast" command in iTunes and then pasting in the URL that links to the xml file.
    So, if someone could please offer any suggestions, and/or a reason why this thing would suddenly STOP working, pleas let me know.
    Thanks!

    Escape the "&" in line 46 - it's breaking the XML:
    http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.imboredpictures.com%2Fe7 8podcastfeed.xml
    Hope this helps,
    Greg

  • XML file too big?

    Hi, I'm a web designer attempting to use the find/replace function in an iTunes XML file to change a directory.
    Seems simple enough:
    find: file://localhost/Volumes/iTunes
    replace: file://localhost/Volumes/iTunes/iTunesLibrary
    The XML file is 41MB. It seems when I open it it only opens the first 8MB and just cuts off the rest of the code. (literally in the middle of an XML tag). I've tried this many times, allowing it to open overnight just to make sure it has enough time to load, but it always does the same thing. Perhaps there's another editor that can provide a find/replace function since Dreamweaver CS4 seems incapable of opening large files properly?
    Dreamweaver CS4, MacBook Pro 2008, OS X 10.6.4

    Smultron, BBEdit. I believe that is "as designed" in DW.
    Mylenium

  • IMovie file too long for iDVD

    I created an iMovie (4 1/2 hours long of Hawaii vacation) that is too large to transfer to one DVD in iDVD. I know this must be simple but, please would someone tell me how to break up my completed movie into two more easily digestible movies that would become DVD part 1 and DVD part 2?
    Thank you!!!

    Hi c
    Catspaw - are exelent.
    My way are more tedious but.
    If You have a very larg hard disk. Copy Your project.
    (Will need about 70Gb free space)
    Edit project 1 to less than 2 hours of the beginning
    Edit project 2 to the following 2 h
    Yes it is tedious and hard disk demanding.
    If You by any chance doesn't have any editing to Your movie the You could
    make it very easy.
    Move the first 2 h to Your time line from Shelf
    Close iMovie and Save
    Locate the QT ref mov in the project icon and make a copy of it on the desktop. Drop this into a folder named part 1
    Start iMovie and replace the clips with what follows - and re do but put
    the QT copy in a folder - part 2
    Keep on till all clips are used.
    Now burn Your DVD's with the new QT ref movie copies.
    One DVD per QT mov.
    It really works.
    Yours Bengt W

  • File name too long cannot copy (cont'd)

    This is a continuation of the post started September 01, 2009, with the last post on
    October 17, 2011 named File name too long cannot copy
    Since this is an ongoing unsolved issue, and the thread was locked, it continues here.
    It is ever so easy to create a long file/path using explorer.exe as will be shown below.
    What needs to be solved is, what is an easy way (no, not by listing out all the files in a directory to a text file and counting characters), perhaps using a shell extension, to find out which files in a directory and it's subdirectories will be (or were)
    too long to copy, (and then perhaps even copying those over either intact or renamed)?
    Maflagulator said:
    I'm running the 7100 build...enjoying it except for one big thing:
    While attempting to copy 402gb from my main storage volume onto a spare 500gb drive (for the purpose of changing to a new RAID array) I've come across something that I would expect a Windows 98 OS to give me.
    It tells me that a file has TOO LONG of a file name, then provides with two unhelpful options: SKIP or CANCEL
    I never had XP give me an issue like this at all, so what gives? And while some specific files did have long file names (such as for songs, etc.) it had 7 issues with folders stating that their name was too long, but in fact they were not since they were
    titled '07-06-07' for the date that I dumped the audio files in them. However, they may have contained FILES with long file names though.
    Anyone else get this same situation? Perhaps the RTM version does not do this? Can anyone verify this regarding their install of the RC or the RTM?
    It made it through 400gb out of the 402gb transfer.
    I'm just happy to see that it doesn't spazz out about an issue like this until it has done all the other transfers that it can do because it saves the issues it has with files until the very end. In XP it would spazz about it the moment it came across it
    causing the transfer process to halt.
    Since long path/file names can so easily be created on Win7, it might be useful to see a typical way this happens, which might then give clues how to work with them.
    In Windows Vista, we learnt from:
    File names and file name extensions: frequently asked questions that:
    Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count.
    In Windows 7, we are told here:
    File names and file name extensions: frequently asked questions that:
    It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters. This is why you might occasionally get an error when copying a file with a very long file name to a location
    that has a longer path than the file's original location.
    From the Windows Dev Center - Desktop, we read about Maximum Path Length Limitation here:
    Naming Files, Paths, and Namespaces
    This helps us understand why a folder can be a maximum of 244 characters, from the defined 260 length of MAX_PATH as follows:
    260 minus C:\ (3) minus <NUL> (1) = 256
    256 minus 8.3 file name (12) = 244
    We also learn there that: The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters.
    And we read the claim that: The shell and the file system have different requirements. It is possible to create a path with the Windows API that the shell user interface is not be able to interpret properly.
    There is also a comment below this document that reads: In a previous iteration of this document, it is mentioned that The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to
    255 characters in length. This information is now gone.
    So we are in a position where the file system and Windows API can create long path/flies that the shell cannot handle.
    But then we need to be able to handle it, so a little exploration might lead to a better understanding of how to do this.
    For most tasks being performed on long folder/files, Windows 7 and other Windows programs balk when the Path+Filename length > 260
    Let's create a long path/file.
    Create a folder called A at the root of a Drive.
    Create a sub-folder of A called: B
    Create a sub-folder of B called: C
    Make a FILE in sub-folder C called (no spaces or break, one long continuous string): 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T
    123456789U123456789V123456789W123456789X123456.txt
    Rename sub-folder C to the string (no spaces or break, one long continuous string) (The actual directory created will be slightly shorter than this full length): 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J
    123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X123456789Y123456789Z
    Rename sub-folder B to the same full string above. (The actual directory created will be slightly shorter than this full length but 2 characters longer than the step above.)
    Rename folder A to that same full original string. (Again the actual directory created will be slightly shorter than this full length but 2 characters longer than the step above.)
    You now have the lovely file placed at (the breaks are just so it fits into the screen):
    C:\123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X1234\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J
    123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X12\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T
    123456789U123456789V123456789W123456789X\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X123456.txt
    You have a folder length of over 700 and a file length of over 250 for a total of over 950
    However you will notice that each folder, when created, could only be a maximum of 247 charachters including the path (example C:\ , & C:\A , & C:\A\B
    This only applies backwards, that is up the path. It did not matter what was further down the path.
    Now, you can't easily access or rename the file, but you can rename the folders easily.
    For best results, start renaming from the top of the Tree, working down the subfolders, because renaming from down up will limit you, and in fact won't work if the folder lengths are too long.
    So how might knowing this help us?
    Well, to copy this long_file from the C:\ drive to the D:\ drive, and keeping the path structure, this should work:
    Note the name of the top folder. Rename it to something very short, say: A (Make sure C:\A does not exist)
    Note the name of the 2nd folder. Rename it to something very short, say: B (Make sure C:\A\B does not exist)
    Note the name of the 3rd folder. Rename it to something very short, say: C (Make sure C:\A\B\C does not exist)
    Make sure D:\A does not exist - then copy the A folder on disk C: to disk D: (which gives you D:\A\B\C\long_file
    Rename D:\A\B\C to D:\A\B\Original_3rd_Folder_name
    Rename D:\A\B to D:\A\B\Original_2nd_Folder_name
    Rename D:\A to D:\Original_top_Folder_name
    Rename C:\A\B\C back to their original names, in this same reverse order starting with C, then B, then A
    Note: If using Explorer, at some points you might have to press the F5 refresh key.
    This is of course how you might copy such long path/files without using the other more "easy" techniques for the "normal" everyday user like:
    sharing a sub-folder
    using the commandline to assign a drive letter by means of SUBST
    using AddConnectionunder VB to assign a drive letter to a path
    using the "\\?\" prefix to a path string to tell the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system
    and so on.
    See how simple Windows can be for Dummies!
    But then, how can we know that files to be copied exceed this MAX_PATH? Or also after a copy has taken place, know exactly which files that have NOT been copied because of exceeding the MAX_PATH limit, and then a procedure to copy these either by renaming
    them, or by copying them intact as they are?
    There have been suggestions to use
    LongPathTool, but this does not have a facility to check a series of folders and tell you which files are going to be caught by the error when copying. So once a copy has taken place using Windows 7, one does not know which files did not get copied, and
    where exactly they are located.
    Neither does the free
    Old Path Scanner do that. It can only check for overly long directory paths, but misses out when the directory path is within limits, but adding in the file name puts it out of bounds.
    So, as shown above, it is ever so easy to create a long file/path using explorer.exe
    So, what then is an easy way (no, not by listing out all the files in a directory to a text file and counting characters), perhaps using a shell extension, to find out which files in a directory and it's subdirectories will be (or were) too long to copy,
    (and then perhaps even copying those over either intact or renamed)?

    This is a not a "solution" ....but a "work around": a low tech fix....for error message "your file name is too long to be copied, deleted, renamed, moved" :
    1.   problem is this: the "file name" has a limit on number of characters.....the sum of characters really includes the entire path name; you gotta shorten it first (i.e, if the total number of characters in the file name + Path name are over the
    limit, the error appears).  The deeper your file folder sub levels are, the more this problem will come up, especially when you copy to a subfolder of a subfolder/subfolder of another path ...adds to character limit)
    2.  How do you know which combined file names + path names are too long if  you are in the  middle of a copy operation and this error pops up?  Some files copied but the "long files error message" says "skip" or "cancel" ... but not which
    files are the "too long" ones.  If you hit "skip" or "cancel" the "too long" files are left behind...but are mixed in with non-offender "good" "short name" files.   Sorting thru 1000s of "good" files to find a few "bad" ones manually is impractical.
    3.   Here's how you sort out the "bad" from the "good":
    4.    Let's say you want to copy a folder ..."Football" ...that has five layers of subfolders; each subfolder contains numerous files:
      C:/1 Football / 2 teams/ 3 players/ 4 stats/ 5 injuriessidelineplayerstoolong 
           There are five levels root "1 football" with subfolders  2, 3, 4 and lastly "5 injuries"
    5.    Use "cut" and "paste"  (for example to backup all five levels to a new backup folder):
           select "1 football" ....cut....select target folder....paste 
           ("cut" command means as the files are copied to the target destination, the file is deleted from the source location)
          Hint: avoid "cut" and "paste" to a target folder that is itself a sub/sub/sub folder ...that compounds the "characters over the limit" problem ...because the characters in the sub/sub/sub folder are included in the "file name
    character limit"...instead "paste" to a C:/ root directory.
           Suppose in the middle of this operation...error pops up: "5 files have file names that are too long"  Skip or cancel?
           select "skip"  ...and let operation finish
    6.    Now go back and look at the source location: since the software allows only the "good" "short name" files to be copied (and because you "skipped" the "bad" "Long name" files so they are not copied or deleted) ...all that remains
    in the source location are the "bad" "long name files" (because "good" ones were deleted from the source location after the "cut" operation...the bad ones stick out like a sore thumb.
    7.   You will find ....all that remains in source folders are: the "bad" "too long" files; in this example the "bad" file is in level 5:
          C:/ 1 football / 2 teams /3 players /4 stats /5 injuriessidelineplayerstoolong
    8.   select folder 5 injuriessidelineplayerstoolong (that's right...select folder, not file) gotta rename the folder first.
    9.  hit F2 rename folder..folder name highlighted...delete some of the letters in the folder name:
           like this:   5 injuriessidelineplayers  ....you should delete 'toolong'....from the folder name
    10.  then go into folder 5....and do the same operation ...with the too long file name:
            hit F2 rename file....file name hightlighted...delete some of the letters
               like this:  injuriessidelineplayers.....you should delete 'toolong' from the file name
    11.  Now..."cut and paste"  the renamed file to the target backup folder.  
    The Error message will pop up again if you missed any "bad" files....for example, it will indicate "5 files too long" ....then repeat process 5 times until you fix all of them
    12.     Finally, copy the target destination files back to the source location (when you are certain all source location file folder locations are empty) 
    Of course, this "makeshift" solution would not be necessary if MSFT would fix the problem...

  • Destination file characters too long (File names) , while copying from one external to another

    I have a external my book fat32 formated and a new mybook ntfs formated external as well.  Now when I copy my files from the fat32 to the ntfs external all files copy fine but some give that destination location file characters are too long, meaning that the file names are too long.  Now I could change the file names but that would conflict with programs that need that file name.  I am using vista ultimate and would like to copy all the files over from the fat32 to ntfs so I can reformat the fat32 to ntfs.  The files got on the ntfs from a simple drag and drop from my IDE NTFS internal hard drive.
    I hope you guys to tell me what to do.
    Thank you :)

    Here's the fix....for error message "your file name is too long to be copied, deleted, renamed, moved" :
    1.   problem is this: the "file name" has a limit on number of characters.....the sum of characters really includes the entire path name; you gotta shorten it first (i.e, if the total number of characters in the file name + Path name are over the
    limit, the error appears).  The deeper your file folder sub levels are, the more this problem will come up, especially when you copy to a subfolder of a subfolder/subfolder of another path ...adds to character limit)
    2.  How do you know which combined file names + path names are too long if  you are in the  middle of a copy operation and this error pops up?  Some files copied but the "long files error message" says "skip" or "cancel" ... but not which
    files are the "too long" ones.  If you hit "skip" or "cancel" the "too long" files are left behind...but are mixed in with non-offender "good" "short name" files.   Sorting thru 1000s of "good" files to find a few "bad" ones manually is impractical.
    3.   Here's how you sort out the "bad" from the "good":
    4.    Let's say you want to copy a folder ..."Football" ...that has five layers of subfolders; each subfolder contains numerous files:
      C:/1 Football / 2 teams/ 3 players/ 4 stats/ 5 injuriessidelineplayerstoolong 
           There are five levels root "1 football" with subfolders  2, 3, 4 and lastly "5 injuries"
    5.    Use "cut" and "paste"  (for example to backup all five levels to a new backup folder):
           select "1 football" ....cut....select target folder....paste 
           ("cut" command means as the files are copied to the target destination, the file is deleted from the source location)
          Hint: avoid "cut" and "paste" to a target folder that is itself a sub/sub/sub folder ...that compounds the "characters over the limit" problem ...because the characters in the sub/sub/sub folder are included in the "file name
    character limit"...instead "paste" to a C:/ root directory.
           Suppose in the middle of this operation...error pops up: "5 files have file names that are too long"  Skip or cancel?
           select "skip"  ...and let operation finish
    6.    Now go back and look at the source location: since the software allows only the "good" "short name" files to be copied (and because you "skipped" the "bad" "Long name" files so they are not copied or deleted) ...all that remains
    in the source location are the "bad" "long name files" (because "good" ones were deleted from the source location after the "cut" operation...the bad ones stick out like a sore thumb.
    7.   You will find ....all that remains in source folders are: the "bad" "too long" files; in this example the "bad" file is in level 5:
          C:/ 1 football / 2 teams /3 players /4 stats /5 injuriessidelineplayerstoolong
    8.   select folder 5 injuriessidelineplayerstoolong (that's right...select folder, not file) gotta rename the folder first.
    9.  hit F2 rename folder..folder name highlighted...delete some of the letters in the folder name:
           like this:   5 injuriessidelineplayers  ....you should delete 'toolong'....from the folder name
    10.  then go into folder 5....and do the same operation ...with the too long file name:
            hit F2 rename file....file name hightlighted...delete some of the letters
               like this:  injuriessidelineplayers.....you should delete 'toolong' from the file name
    11.  Now..."cut and paste"  the renamed file to the target backup folder.  
    The Error message will pop up again if you missed any "bad" files....for example, it will indicate "5 files too long" ....then repeat process 5 times until you fix all of them
    12.     Finally, copy the target destination files back to the source location (when you are certain all source location file folder locations are empty) 

  • Embedding data from xml file into metadata of a pdf

    Hi All
    I'm wanting to do the following, but struggling to figure the right way to go about it.
    I want to embedded data from my MIS into a pdf's metadata (as scrnshot). I can create a standalone xml file with all the data I require, but I'm unsure how to automate that being embedded into a pdf's advanced metadata. I know this can be done, as it worked at a previous employer, but I didn't get chance to find out how they did it.
    I'm wanting to do this so I can carry out a more advanced search of the metadata in Bridge.
    Any advice would be appreciated!

    Hi Northern,
        I have modified the modifyingXMP sample for you. After this change, put your xmp file as sample.xml and also put pdf file in the same folder where ModifyXMP executable is. After merging my changes, ModifyXMP file will read the sample.xml and will embed it into pdf file.
       Please follow the following steps
    1. Download XMPToolkit SDK and follow the steps to compile Sample
    2. Open ModifyingXMP file, replace all the content of that file with the below content
    3. Compile the ModifyingXMP file.
    4. The ModifyXMP.exe will be generated in folder (samples\target\windows\Debug), if you have changed the output folder it will be generated there.
    5. In parallel to ModifyingXMP.exe put the sample.xml (the xml file you have) and also the pdf file (say pdf file name is mypdf.pdf)
    6. Go to console and change directory to the directory where ModifyingXMP is and pass the following command
    ModifyingXMP mypdf.pdf
    7. Open the pdf file and check that value/properties
    For your reference, I am putting the content of the sample.xml file too, put this content in sample.xmp and any pdf and you will find subject field is getting added.
    ************** content of the sample.xml file. Create a file name sample.xml and put that content. Put sample.xml in parallel to ModifyingXMP.exe*******
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
        <rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>
            <dc:subject>
                <rdf:Bag>
                    <rdf:li>XMP</rdf:li>
                    <rdf:li>SDK</rdf:li>
                    <rdf:li>Sample</rdf:li>
                </rdf:Bag>
            </dc:subject>
            <dc:format>image/tiff</dc:format>
        </rdf:Description>
    </rdf:RDF>
    ******************* MODIFIED CONTENT OF MODIFYING.CPP FILE. ***************************************************************************************** ************
    // ========================================================================================= ========
    // Copyright 2008 Adobe Systems Incorporated
    // All Rights Reserved.
    // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
    // of the Adobe license agreement accompanying it.
    // ========================================================================================= ========
    * Tutorial solution for Walkthrough 2 in the XMP Programmers Guide, Modifying XMP
    * Demonstrates how to open a file for update, and modifying the contained XMP before writing it back to the file.
    #include <cstdio>
    #include <vector>
    #include <string>
    #include <cstring>
    // Must be defined to instantiate template classes
    #define TXMP_STRING_TYPE std::string
    // Must be defined to give access to XMPFiles
    #define XMP_INCLUDE_XMPFILES 1
    // Ensure XMP templates are instantiated
    #include "public/include/XMP.incl_cpp"
    // Provide access to the API
    #include "public/include/XMP.hpp"
    #include <iostream>
    #include <fstream>
    using namespace std;
    * Creates an XMP object from an RDF string.  The string is used to
    * to simulate creating and XMP object from multiple input buffers.
    * The last call to ParseFromBuffer has no kXMP_ParseMoreBuffers options,
    * thereby indicating this is the last input buffer.
    #include <sstream>     
    SXMPMeta createXMPFromRDF()
        string rdf;
        //open the RDF file and put it's content into rdf buffer
        ifstream inFile;
        inFile.open("sample.xml");//open the input file
        if (!inFile.is_open()) {
            cout <<"Couldn't open xml file" <<endl;
            exit(1);
        stringstream strStream;
        strStream << inFile.rdbuf();//read the file
        rdf = strStream.str();//str holds the content of the file
        SXMPMeta meta;
        // Loop over the rdf string and create the XMP object
        // 10 characters at a time
        int i;
        for (i = 0; i < (long)rdf.size() - 10; i += 10 )
            meta.ParseFromBuffer ( &rdf[i], 10, kXMP_ParseMoreBuffers );
        meta.ParseFromBuffer ( &rdf[i], (XMP_StringLen) rdf.size() - i );
        return meta;
    int main ( int argc, const char * argv[] )
        if ( argc != 2 ) // 2 := command and 1 parameter
            cout << "usage: ModifyingXMP (filename)" << endl;
            return 0;
        string filename = string( argv[1] );
        if(!SXMPMeta::Initialize())
            cout << "Could not initialize toolkit!";
            return -1;
        XMP_OptionBits options = 0;
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
        // Must initialize SXMPFiles before we use it
        if(SXMPFiles::Initialize(options))
            try
                // Options to open the file with - open for editing and use a smart handler
                XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
                bool ok;
                SXMPFiles myFile;
                std::string status = "";
                // First we try and open the file
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                if( ! ok )
                    status += "No smart handler available for " + filename + "\n";
                    status += "Trying packet scanning.\n";
                    // Now try using packet scanning
                    opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                    ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                // If the file is open then read get the XMP data
                if(ok)
                    cout << status << endl;
                    cout << filename << " is opened successfully" << endl;
                    // Create the XMP object and get the XMP data
                    SXMPMeta meta;
                    myFile.GetXMP(&meta);
                    // Create a new XMP object from an RDF string
                    SXMPMeta rdfMeta = createXMPFromRDF();
                    // Append the newly created properties onto the original XMP object
                    // This will:
                    // a) Add ANY new TOP LEVEL properties in the source (rdfMeta) to the destination (meta)
                    // b) Replace any top level properties in the source with the matching properties from the destination
                    SXMPUtils::ApplyTemplate(&meta, rdfMeta, kXMPTemplate_AddNewProperties | kXMPTemplate_ReplaceExistingProperties | kXMPTemplate_IncludeInternalProperties);
                    // Check we can put the XMP packet back into the file
                    if(myFile.CanPutXMP(meta))
                        // If so then update the file with the modified XMP
                        myFile.PutXMP(meta);
                    // Close the SXMPFile.  This *must* be called.  The XMP is not
                    // actually written and the disk file is not closed until this call is made.
                    myFile.CloseFile();
                else
                    cout << "Unable to open " << filename << endl;
            catch(XMP_Error & e)
                cout << "ERROR: " << e.GetErrMsg() << endl;
            // Terminate the toolkit
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        else
            cout << "Could not initialize SXMPFiles.";
            return -1;
        return 0;
    Please let me know if you find any issue/assistance.
    -Sunil

  • How to compare after parsing xml file

    Hi,
    following code, parse the input.xml file, counts how many nodes are there and writes the node name and its value on screen.
    1) i am having trouble writing only node name into another file instead of writing to screen.
    2) after parsing, i like to compare each node name with another .xsd file for existence.
    Please keep in mind that, input.xml is based on some other .xsd and after parsing i have comparing its tag with another .xsd
    Need you help guys.
    thanks
    * CompareTags.java
    import java.io.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    /** This class represents short example how to parse XML file,
    * get XML nodes values and its values.<br><br>
    * It implements method to save XML document to XML file too
    public class CompareTags {
    private final static String xmlFileName = "C:/input.xml";
         int totalelements = 0;
    /** Creates a new instance of ParseXMLFile */
    public CompareTags() {
    // parse XML file -> XML document will be build
    Document doc = parseFile(xmlFileName);
    // get root node of xml tree structure
    Node root = doc.getDocumentElement();
    // write node and its child nodes into System.out
    System.out.println("Statemend of XML document...");
    writeDocumentToOutput(root,0);
                   System.out.println("totalelements in xyz tag " + totalelements);
              System.out.println("... end of statement");
    /** Returns element value
    * @param elem element (it is XML tag)
    * @return Element value otherwise empty String
    public final static String getElementValue( Node elem ) {
    Node kid;
    if( elem != null){
    if (elem.hasChildNodes()){
    for( kid = elem.getFirstChild(); kid != null; kid = kid.getNextSibling() ){
    if( kid.getNodeType() == Node.TEXT_NODE ){
    return kid.getNodeValue();
    return "";
    private String getIndentSpaces(int indent) {
    StringBuffer buffer = new StringBuffer();
    for (int i = 0; i < indent; i++) {
    buffer.append(" ");
    return buffer.toString();
    /** Writes node and all child nodes into System.out
    * @param node XML node from from XML tree wrom which will output statement start
    * @param indent number of spaces used to indent output
    public void writeDocumentToOutput(Node node,int indent) {
    // get element name
    String nodeName = node.getNodeName();
    // get element value
    String nodeValue = getElementValue(node);
    // get attributes of element
    NamedNodeMap attributes = node.getAttributes();
    System.out.println(getIndentSpaces(indent) + "NodeName: " + nodeName + ", NodeValue: " + nodeValue);
    for (int i = 0; i < attributes.getLength(); i++) {
    Node attribute = attributes.item(i);
    System.out.println(getIndentSpaces(indent + 2) + "AttributeName: " + attribute.getNodeName() + ", attributeValue: " + attribute.getNodeValue());
    // write all child nodes recursively
    NodeList children = node.getChildNodes();
              //int totalelements = 0;
    for (int i = 0; i < children.getLength(); i++) {
    Node child = children.item(i);
                   //     System.out.println("child value.."+child);
    if (child.getNodeType() == Node.ELEMENT_NODE) {
    writeDocumentToOutput(child,indent + 2);
                             if(node.getNodeName() == "DATA"){
                             totalelements = totalelements+1;}
                        //System.out.println("totalelements in DATA tag " + totalelements);
    /** Parses XML file and returns XML document.
    * @param fileName XML file to parse
    * @return XML document or <B>null</B> if error occured
    public Document parseFile(String fileName) {
    System.out.println("Parsing XML file... " + fileName);
    DocumentBuilder docBuilder;
    Document doc = null;
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setIgnoringElementContentWhitespace(true);
    try {
    docBuilder = docBuilderFactory.newDocumentBuilder();
    catch (ParserConfigurationException e) {
    System.out.println("Wrong parser configuration: " + e.getMessage());
    return null;
    File sourceFile = new File(fileName);
    try {
    doc = docBuilder.parse(sourceFile);
    catch (SAXException e) {
    System.out.println("Wrong XML file structure: " + e.getMessage());
    return null;
    catch (IOException e) {
    System.out.println("Could not read source file: " + e.getMessage());
    System.out.println("XML file parsed");
    return doc;
    /** Starts XML parsing example
    * @param args the command line arguments
    public static void main(String[] args) {
    new CompareTags();
    }

    hi,
    check out the following links
    Check this blog to extract from XML:
    /people/kamaljeet.kharbanda/blog/2005/09/16/xi-bi-integration
    http://help.sap.com/saphelp_nw04/helpdata/en/fe/65d03b3f34d172e10000000a11402f/frameset.htm
    Check thi link for Extract from any DB:
    http://help.sap.com/saphelp_nw04s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    regards
    harikrishna N

  • AS3 alternatives to *_exclude.xml files, loading class definitions dynamically

    I've been banging my head against a wall for this for almost a couple days now and hoping that someone can point me in the right direction.
    Working in a very large Flash application, previously in AS2/CS3 I would have a setup like the following:
    root.swf
    -- modules
    ---- code_a.swf
    ---- code_b.swf
    -- views
    ---- view_a.swf
    ---- view_b.swf
    Using _exclude.xml files, I could exclude the classes defined in code_a and code_b from the ouptut .swf of view_a and view_b. root.swf would be responsible for loading the code modules before view_a or view_b, ensuring that class definitions that view_a and view_b depended on existed.
    The Problem
    We've recently migrated to using Actionscript 3/CS5. *_exclude.xml files no longer exist. To get the same functionality as above, I've tried the following:
    My setup now looks something like:
    root.swf
    -- modules
    ---- class_a.as
    ---- class_b.as
    -- views
    ---- view_a.swf
    ---- view_b.swf
    Use mxmlc to compile root.swf, view_a.swf and view_b.swf, passing it -externs option to specify classes that will be loaded externally (the two classes in modules). This ensures that the class is excluded from the compiled swf.
    Use compc to compile class_a.as and class_b.as into classes.swf, using -directory=true to access library.swf for external loading.
    However, when I try running one of the two view files which depend on classes.swf, I get runtime errors telling me that a class definition is not present.
    Current Workaround
    I've devised a workaround which I'm currently not happy with as it's backwards to the modular approach that I was previously using:
    Rather than loading the code modules, I statically link all class definitions required by child movies intoroot.swf. When building root.swf, I use the -link-report option of mxmlc to provide a list of included classes. When building child swfs, I can the use -load-externs to ensure that class definitions that already exist will not be included in the compile output.
    Is there a way that anyone is aware of to replicate the AS2/_exclude.xml solution that I had using AS3/CS5?

    I'd double check if you are loading the child SWF with correct LoaderContext and/or calling ApplicationDomain.getDefinition() correctly - otherwise you cannot access classes defined in loaded SWF files.

  • SAX: How to create new XML file using SAX parser

    Hi,
    Please anybody help me to create a XML file using the Packages in the 5.0 pack of java. I have successfully created it reading the tag names and values from database using DOM but can i do this using SAX.
    I am successful to read XML using SAX, now i want to create new XML file for some tags and its values using SAX.
    How can i do this ?
    Sachin Kulkarni

    SAX is a parser, not a generator.Well,
    you can use it to create an XML file too. And it will take care of proper encoding, thus being much superior to a normal textwriter:
    See the following code snippet (out is a OutputStream):
    PrintWriter pw = new PrintWriter(out);
          StreamResult streamResult = new StreamResult(pw);
          SAXTransformerFactory tf = (SAXTransformerFactory) TransformerFactory.newInstance();
          //      SAX2.0 ContentHandler.
          TransformerHandler hd = tf.newTransformerHandler();
          Transformer serializer = hd.getTransformer();
          serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");//
          serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"pdfBookmarks.xsd");
          serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"http://schema.inplus.de/pdf/1.0");
          serializer.setOutputProperty(OutputKeys.METHOD,"xml");
          serializer.setOutputProperty(OutputKeys.INDENT, "yes");
          hd.setResult(streamResult);
          hd.startDocument();
          //Get a processing instruction
          hd.processingInstruction("xml-stylesheet","type=\"text/xsl\" href=\"mystyle.xsl\"");
          AttributesImpl atts = new AttributesImpl();
          atts.addAttribute("", "", "someattribute", "CDATA", "test");
          atts.addAttribute("", "", "moreattributes", "CDATA", "test2");
           hd.startElement("", "", "MyTag", atts);
    String curTitle = "Something inside a tag";
              hd.characters(curTitle.toCharArray(), 0, curTitle.length());
        hd.endElement("", "", "MyTag");
          hd.endDocument();
    You are responsible for proper nesting. SAX takes care of encoding.
    Hth
    ;-) stw

  • "PLS-00172: string literal too long" When Writing XML file into a Table

    Hi.
    I'm using DBMS_XMLStore to get a XML file into a db table. See the example below, I'm using that for my PL/SQL format. Problem is that because there're too many XML elements that I use in "xmldoc CLOB:= ...", I get "PLS-00172: string literal too long" error.
    Can someone suggest a workaround?
    THANKS!!!
    DECLARE
    insCtx DBMS_XMLStore.ctxType;
    rows NUMBER;
    xmldoc CLOB :=
    '<ROWSET>
    <ROW num="1">
    <EMPNO>7369</EMPNO>
    <SAL>1800</SAL>
    <HIREDATE>27-AUG-1996</HIREDATE>
    </ROW>
    <ROW>
    <EMPNO>2290</EMPNO>
    <SAL>2000</SAL>
    <HIREDATE>31-DEC-1992</HIREDATE>
    </ROW>
    </ROWSET>';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('scott.emp'); -- get saved context
    DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings
    -- set the columns to be updated as a list of values
    DBMS_XMLStore.setUpdateColumn(insCtx,'EMPNO');
    DBMS_XMLStore.setUpdateColumn(insCtx,'SAL');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'HIREDATE');
    -- Now insert the doc.
    -- This will only insert into EMPNO, SAL and HIREDATE columns
    rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
    -- Close the context
    DBMS_XMLStore.closeContext(insCtx);
    END;
    /

    You ask where am getting the XML doc. Well, am not
    getting the doc itself.I either don't understand or I disagree. In your sample code, you're certainly creating an XML document-- your local variable "xmldoc" is an XML document.
    DBMS_XMLSTORE package needs
    to know the canonical format and that's what I
    hardcoded. Again, I either don't understand or I disagree... DBMS_XMLStore more or less assumes the format of the XML document itself-- there's a ROWSET tag, a ROW tag, and a then whatever column tags you'd like. You can override what tag identifies a row, but the rest is pretty much assumed. Your calls to setUpdateColumn identifies what subset of column tags in the XML document you're interested in.
    Later in code I use
    DBMS_XMLStore.setUpdateColumn to specify which
    columns are to be inserted.Agreed.
    xmldoc CLOB :=
    '<ROWSET>
    <ROW num="1">
    <KEY_OLD> Smoker </KEY_OLD>
    <KEY_NEW> 3 </KEY_NEW>
    <TRANSFORM> Specified </TRANSFORM>
    <KEY_OLD> Smoker </KEY_OLD>
    <VALUEOLD> -1 </VALUEOLD>
    EW> -1 </VALUENEW>
         <DESCRIPTION> NA </DESCRIPTION>
    </ROW>
    ROWSET>';This is your XML document. You almost certainly want to be reading this from the file system and/or have it passed in from another procedure. If you hard-code the XML document, you're limited to a 32k string literal, which is almost certainly causing the error you were reporting initially.
    As am writing this I'm realizing that I'm doing this
    wrong, because I do need to read the XML file from
    the filesystem (but insert the columns
    selectively)...What I need to come up with is a proc
    that would grab the XML file and do inserts into a
    relational table. The XML file will change in the
    future and that means that all my 'canonical format'
    code will be broken. How do I deal with anticipated
    change? Do I need to define/create an XML schema in
    10g if am just inserting into one relat. table from
    one XML file?What does "The XML file will change in the future" mean? Are you saying that the structure of the XML document will change? Or that the data in the XML document would change? Your code should only need to change if the structure of the document changes, which should be exceptionally uncommon and would only be an issue if you're adding another column that you want to work with, which would necessitate code changes.
    I found an article where the issue of changing XML
    file is dealt by using a XSL file (that's where I'd
    define the 'canonical format'), but am having a
    problem with creating one, because the source XML is
    screwed up in terms of the format:
    it's not <x> blah </x>
    <x2> blah </x2>
    x2="blah" x3="blah> ...etc
    Can you point me in the right direction, please?You can certainly use something like the DBMS_XSLProcessor package to transform whatever XML document you have into an XML document in an appropriate format for the XMLStore package and pass that transformed XML document into something like your sample procedure rather than defining the xmldoc local variable with a hard-coded document. Of course, you'd need to write appropriate XSL code to do the actual transform.
    Justin

  • XML Pub: Purchase Order  Report (Portrait) running too long

    Hi:
    "XML Pub: Purchase Order Report (Portrait)" running too long. It should be 1min. but now over 20min. This is 11.5.10.2 on unix.
    The log file is like the following. It stops there. I checked another one ran before, there are more data...
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    P_report_type='R'
    P_po_num_from='6640015'
    P_po_num_to='6640015'
    P_test_flag='N'
    P_user_id='14955'
    P_QTY_PRECISION='4'
    P_fax_ind='N'
    P_EMAIL_IND='N'
    P_REQUEST_SOURCE='MANUAL'
    Environment will now switch to UTF-8 code-set.
    Parts of this log file may not display correctly
    as a result. This is an expected behavior.
    XML_REPORTS_XENVIRONMENT is :
    /oracle/product/8.0.6finshdw/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /oracle/product/8.0.6finshdw/guicommon6/tk60/admin/Tk2M
    otif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    ===============================================
    From the internal Manager log:
    Process monitor session started : 29-APR-2011 12:35:56
    Internal Concurrent Manager found node APPSNOTE2 to be down. Adding it to the l
    ist of unavailable nodes.
    Process monitor session ended : 29-APR-2011 12:36:00
    Process monitor session started : 29-APR-2011 12:38:00
    Process monitor session ended : 29-APR-2011 12:38:04
    Process monitor session started : 29-APR-2011 12:40:04
    Process monitor session ended : 29-APR-2011 12:40:09
    Process monitor session started : 29-APR-2011 12:42:09
    Internal Concurrent Manager found node APPSNOTE1 to be down. Adding it to the l
    ist of unavailable nodes.
    Process monitor session ended : 29-APR-2011 12:42:15
    ======================
    please advise.

    last lines of FNDCPGSC29793.tx
    )]:BEGIN :[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 10 seconds (10000 ms)
    [ 1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Running loop from the top.
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:BEGIN (noEvent)
    :-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:Did not receive any control events.
    -1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsm.GSMQueueProcessor.process()]:BEGIN
    :-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsm.GSMQueueProcessor.read()]:BEGIN
    :-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Running loop from the top.
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:BEGIN (noEvent)
    :-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:Did not receive any control events.
    :-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.process()]:BEGIN
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.startAutomaticComponents()]:BEGIN
    -1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.process()]:On-Demand monitoring will not occur this round; the count is 3 out of 5
    [Apr 29, 2011 1:19:5 :-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Resetting Error Count
    [Apr 29, 2011 1:19:51  1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:BEGIN :1304097591452:Thread[ComponentMonitor,5,main]:0:-1:
    -1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 60 seconds (60000 ms)
    [Apr 29, 2011 1:20:00 PM EDT] 1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:BEGIN
    [Apr 29, 2011 1:20:00 PM EDT]: 4:-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 10 seconds (10000 ms)
    Edited by: user9231603 on Apr 29, 2011 10:22 AM
    Edited by: user9231603 on Apr 29, 2011 10:25 AM

  • SharePoint 2010, Visual Studio 2010, Packaging a solution - The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi,
    I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
    <Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
    to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
    I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
    I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
    renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
    Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
    error logging. So we created another project in Visual Studio called:
    <Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
    And this is when the error has come back and bitten me! The scenario is now as follows:
    1. project1 packages and deploys successfully with long feature names and deep paths.
    2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
    I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
    1. By doing the following I can get project2 to package
    In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
    Clean the solution
    Shut down Visual Studio 2010
    Open Visual Studio 2010
    Rebuild the solution
    Package the project2
    et voila the package is generated!
    This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
    no longer be hanging onto something.
    Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
    solutions on a Build Server using automated builds.
    2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
    3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
    does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
    4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
    from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
    5. DebugView shows nothing useful during the build and packaging of the project.
    6. The error seems to occur in
    CreateSharePointProjectService target called at line 365 of
    Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
    project2 completely and recreate it and introduce it into my Visual Studio solution.
    Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
    Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
    project etc... and is actually workable in a meaningful Visual Studio solution.

    Hi
    Yes, I thought I had fixed this my moving my solution from the usual documents  to
    c:\v2010\projectsOverflow\DetailedProjectTimeline
    This builds ok, but when I come to package I get the lovely error:
    Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
    Now, the error seems to be related to 
    Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
    <metaData>
    <type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
    <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="Title" type="string">VisualProjectTimelineWebPart</property>
    <property name="Description" type="string">My Visual WebPart</property>
    </properties>
    </data>
    </webPart>
    </webParts>
    .... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
    Daniel

Maybe you are looking for

  • BAPI_MOSRVAPS_SAVEMULTI3 Taking longer time to complete

    I am calling this bapi passing 100k records in the background job and it takes more than 5hrs to complete. Is there any way this run time can be reduced. I cannot slice the file as I need to create the master schedule either all or none. also I tried

  • Multiple Oracle Homes

    Hi everybody, I have Oracle 9i installed on my Windows machine. I installed Oracle Developer Suite, but could not login due to TNS errors. I have a little idea of what the problem is. We need to edit TNSNAMES.ORA file so that it could resolve the ser

  • Volume Automatically Going Down.. Please Help

    I'm just trying to listen to my ipod! On the screen it has the volume control instead of the track time.. i attempt to turn the volume up - it will go up and automatically turn down... the whole way.. I hope the answer isn't to restore this thing.. i

  • Download ALV result list as excel-file in background job

    Dear Experts, I am looking for a possibily to download the result of an ALV based report as excel-file in a background job. Surely there is a standard function which can be used or at least some hints how to implement this. I searched the forum but c

  • Where to find names for buttons and toolbars for use in userChrome.css?

    I'm trying to change the layout of the new beta 8 browser, I would like to put the tab bar up into the title bar. The only problem with this is that the Home button and the New Tab button then stop working. I know that the Home button is called "home