Need help processing XML files

I'm fairly new to Java and have never worked with XML. I need to process several XML files and display them in a matrix for comparison and I'm not sure if I need to understand SAX, DOM or some other API. I'm not creating the files, I'm just parsing them to put into a table so they can be displayed for comparison. I could be processing up to several hundreds of files, so performance would also be an issue.
I'm just looking for options and possible areas I can begin to look for help. Can anyone tell me which APIs would help me acheive my goal?
Any help would be greatly appreciated.
Thanks

Thanks for the response Kev. I guess a better diescription of the problem would be to say that I want to display the attributes and values of the differnet files in a matrix.
For example...
Here are 2 sample xml files with the same tags and attributes.
XML FILE A
<tag1 name="Fred", country="ca">
<tag2 group-name="Group 1">
<tag3 color ="blue">
</tag3>
</tag2>
</tag1>
XML FILE B
<tag1 name="Sue", country="us">
<tag2 group-name="Group 2">
<tag3 color="red">
</tag3>
</tag2>
</tag1>
I would like to have them displayed as follows...
XML FILE A XML FILE B
tag1 name           Fred Sue
tag1 country           ca us
tag2 group-name          Group 1 Group 2
tag3 Color          Blue     Red
HTML tags didn't work, so the matrix is bunched together, but I think you get the idea. My question is, which would be better to use SAX or DOM. I could be running this on as many as 50 or 60 files, so the matrix could get very large and performance could be an issue as multiple users could be doing this comparison at the same time.

Similar Messages

  • PL/SQL procedure to process XML file

    I am just starting to work on xml, and we are using PL/SQL stored procedures to process xml file. I did find the sample code in the package (family.sql). This sample print out all element names and attributes. My questions are :
    (1) I tried to modify the code to print out the element values (or Node values). Here is the code:
    -- get all elements and values
    nl := xmlparser.getElementsByTagName(doc, '*');
    len := xmlparser.getLength(nl);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmlparser.item(nl, i);
    dbms_output.put_line('NodeName: ' &#0124; &#0124; xmlparser.getNodeName(n) &#0124; &#0124; ' ');
    dbms_output.put_line('NodeValue: ' &#0124; &#0124; xmlparser.getNodeValue(n) &#0124; &#0124; ' ');
    end loop;
    However, it did not print out the values, although it did print out the name. what's wrong with it? how can I get the value?
    (2) I have the following xml file:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile>
    <subid>1</subid>
    <subname>group1</subname>
    <subdesc>group profile</subdesc>
    </subprofile>
    </profile>
    now, I'd like to print out all the children of the <subprofile> node, that is <subid>, <subname> and <subdesc>. Here is my code:
    -- get subprofile nodelist
    qnlist := xmlparser.getElementsByTagName(doc, 'subprofile');
    -- get length of the nodelist
    len := xmlparser.getLength(qnlist);
    -- loop through elements
    for i in 0..len-1 loop
    qnode := xmlparser.item(qnlist, i);
    qnnode := xmlparser.getFirstChild(qnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    LOOP
    if (xmlparser.isNULL(xmlparser.getNextSibling(qnnode))) then exit;
    END IF;
    qnnode := xmlparser.getNextSibling(qnnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    END LOOP;
    end loop;
    when I execute the procedure, I get the following output:
    #text
    I am not sure what's wrong with it. Basically, I didn't know the procedure to traverse the tree since here it's a little different from OO programming. Could someone give a sample code which demonstrate the procedure which can get a specific element's name and values? (for my exapmle, the name and value of the <subname>, or <subid>, <subdesc>).
    Also, is there a way to insert a part of xml file into a DB table? in my case, insert the subprofile into a table. I know the xmlgen package has a procedure to insert a xml file into a table, but not a part of xml. And can I insert a xml file into several tables instead of one table, using xmlgen package?
    looking forward to hearing from you. any suggestion and sample code would be helpful. thank you very much.
    null

    I sloved my first question: to get the Nodevalue, I need to use getFirstChild(n);
    But, I still didn't figure out the second
    problem. Actually, It works when I modified my xml file as following:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile><subid>1</subid><subname>group1</subname><subdesc>groupprofile</subdesc></subprofile>
    </profile>
    All the <subprofile>....</subprofile> must be in one line without any return. This is unbelievable! It suppose that xml does not matter new lines. I tested my code, it seems space is fine, but new line. Something must be wrong in my code.
    please give any suggestion. Thanks,
    Yudong
    null

  • I need help with XML Gallery Fade in out transition. somebody please help me :(

    I need help with XML Gallery Fade in out transition. somebody please help me
    I have my post dont want to duplicate it

    The problem doesn't lie with your feed, although it does contain an error - you have given a non-existent sub-category. You need to stick to the categories and sub-categories listed here:
    http://www.apple.com/itunes/podcasts/specs.html#categories
    Subscribing to your feed from the iTunes Store page work as such, but the episodes throw up an error message. The problem lies with your episode media files: you are trying to stream them. Pasting the URL into a browser produces a download (where it should play the file) of a small file which does not play and in fact is a text file containing (in the case of ep.2) this:
    [Reference]
    Ref1=http://stream.riverratdoc.com/RiverratDoc/episode2.mp3?MSWMExt=.asf
    Ref2=http://70.33.177.247:80/RiverratDoc/episode2.mp3?MSWMExt=.asf
    You must provide a direct link to the actual mp3 file. Streaming won't work. The test is that if you paste the URL of the media file (as given in the feed) into the address bar of a browser it should play the file.

  • What do I need to process raw files in Photoshop CS5 for a Canon Rebel EOS t4i?

    What do I need to process raw files in Photoshop CS5 for a Canon Rebel EOS t4i?

    You would need ACR 7.x which is available in CS6.  Or as ertho said you can get the free DNG 7.3 converter and convert raw to a DNG.

  • Will I need a crossdomain.xml file?

    I have been working on my first Flex application and it
    builds several menu structures based on data received from external
    XML files. Everything works fine when running the project within
    Flex Builder but when I move the build directory (/bin) to another
    location it does not load my menus. I have since found out this is
    because of the security setting the projects build directory gets
    and to get my files to work elsewhere I will need a crossdomain.xml
    file.
    After researching how crossdomain.xml files work I'm
    wondering if in my case I should even need one because the files my
    SWF are loading will already be placed on the local machine - not a
    server. Still, the application is not working so I have tried a
    crossdomain.xml anyways using the following code:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "
    http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="192.168.*" secure="false"/>
    </cross-domain-policy>
    The file seems to have no effect (althought the "192.168.*"
    string I used may not be what I want) and I'm looking for other
    options. Also, I was originally getting my XML from an HTTPRequest
    but am now using a URLRequest() which then converts the content to
    XML which I find cleaner in the code.
    Any ideas keeping in mind this application will have all its
    content loaded from CD onto the users local drive?

    This is always a little confusing. Here's how it works. The
    Flash Player is aware of which domain is referenced when the first
    SWF is loaded. The "domain" could be www.adobe.com or
    labs.adobe.com or 192.168.0.100. The Flash Player thinks of this as
    its home domain. Any reference to any other domain is a security
    concern. Even if that happens to be "localhost".
    Things work from Flex Builder because Flex Builder registers
    its directories with the Flash Player and makes everything have the
    security level of "local-trusted". This means your Flex app can
    load files from anywhere - the local file system (via HTTPService
    for example, not a direct read of the file) or from the network.
    When you move your SWF to another place, such as a web
    server, that server's domain becomes the home, trusted domain for
    the Flash Player when it loads a SWF from there. If your data file
    is in the same domain as the SWF (eg, in the same directory or a
    sub-directory), then the Flash Player won't have a problem loading
    it.
    HTTPService url="mydata/myfile.xml" or
    url="/flex/mydata/myfile.xml" work because they are relative paths
    to where the SWF is located and thus, in the same domain. However,
    if you do: url="
    http://localhost/mydata/myfile.xml"
    and the SWF is now coming from a web server in a different domain
    (foreign domain), then its a security problem.
    In order for the Flash Player to be allowed to load data from
    outside the home domain, there must be something that authorizes
    it. That's the crossdomain.xml file. When the Flash Player sees
    that you are going to load a file from a different domain, it asks
    that domain for its crossdomain.xml file. The Player then looks to
    see if its home domain is among those allowed to access files. If
    not, security error. If the home domain is present, then the file
    is requested.
    The crossdomain.xml file should list the home domain of the
    SWF, not your machine's domain or IP address. For example, suppose
    the SWF is now on adobe.com and is launched like this:
    http://www.adobe.com/flex/YourApp.html.
    The Flash Player will assume that www.adobe.com is its home domain.
    Even if you are in the abcxyz.com domain.
    Now your Flex app wants to load
    http://localhost/mydata/myfile.xml.
    The Player will ask for
    http://localhost/crossdomain.xml
    and look to see if www.adobe.com is allowed access.
    To recap:
    The domain of the first SWF loaded
    into the Player is the home domain.
    Any access to data outside of the
    home domain requires a crossdomain.xml file.
    The crossdomain.xml file should be at
    the context root of the domain (eg,
    http://www.adobe.com/crossdomain.xml
    or
    http://localhost/crossdomain.xml).
    The home domain must be granted access to load any resources from
    the foreign domain.
    If you are using Flex Data Services and you have
    useProxy="true" on your data service request, then some different
    security rules apply. Let us know if that's the case.

  • Problem in JAXB for processing XML files

    hello
    I have been working on a project where i need to process data in XML format. the flow goes thus
    I have 28 data elements that i need to represent as a XML so i compile the schema files and generate the class files for each of the tags and thus i can use the get and set methods to read and write to a XML file respectively(example getName and setName)......
    Now the problem is that my coding is done if i change my xml file and add say 2 more tags how do i handle it in my code.........
    1>Do i have recomplie the schema file and generate new class files every time the xml structure changes. can i avoid this recompiling process and use a one time genrated class files even if the xml structure changes.
    2>Now i have hard coded the get and set methods for processing the xml file if i add new tags to my xml i wouldnt have the get set methods for the new tags in my code(say i add a new tag as Phone then i wouldnt have the codes getPhone and setPhone called in my code and this tage was added after the coding was done)........how do i handle this situation. Is is possible that i can get and set data without using these methods and use some sort of a dynamic way of getting and setting data.............
    3>Any other approach available to meet the above requirements other than JAXB.
    Please help for the above problem
    Thank you

    hi,
    i had written a xml and schema to validate.
    my xml would be
    <output>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    </output>
    schema should validate : each table should contain atleast one row element and each row element should have atleast one column. similarly, each document should have atleast one properties and contents element.
    if any of these things occur. for ex: if there is no row element in table, i need to delete the table tag. similary if there is no properties/content or both element in document it should delete the corresponding document from the xml.
    i tried for table if there is no row element am getting the line number of the </table> tag, based on that am deleting the table element. if there is no properties tag and contents tag is there. am getting the line number for <contents>start tag, with which i could not able to delete the whole document.
    can anybody plz help me out for this requirement

  • Pls help - produce xml file with an agreed-upon DTD

    I posted this a few weeks ago:
    I have only installed XSU, and I was hopping to use pl/sql package XMLGEN to generate XML with a given DTD and a sql query.
    I can't find input parameter for DTD. Well it seems logical as both DTD and SQL are for defining the XML output file.
    How can this be done ?
    Thanks.
    /Kwan
    Do I need to process the DTD to generate Java classes ? and then create XML document by a java application ?
    I am in a pl/sql shop and I am not eager to go java because I need to use a DTD.
    comments / help ?
    thanks.
    /Kwan
    I am in a pl/sql shop

    Cross-post: http://forum.java.sun.com/thread.jspa?threadID=784467&messageID=4459240#4459240

  • Issue while processing xml file

    Hi guys -
    I am getting error 7000 : null : com.sunopsis.sql.l: Oracle Data Integrator Timeout : connection with URL jdbc:snps:xml ...... while processing data from an xml file which is located in linux directory. I have changed the timout parameter from 30 to 500 in my client. Also modified the userpref.xml as suggested by many in forums but no use. When I checked the failed stage it shows that it gets timed out in 30 seconds. The same when i processed from my local window machine worked fine.
    Could you please help me overcome this trouble.? Please help.
    Thanks

    Hi
    You can edit userpref.xml file reside inside bin directory of ODI_HOME (oracledi folder). You need to edit the field name "value" (eg: [30] to [60]). Then restart the application and ODI Agent.
    <Object class="com.sunopsis.dwg.dbobj.SnpUserParam">
    <Field name="Key" type="java.lang.String"><![CDATA[DEFAULT_REPOSITORY_CONNECTION_TIMEOUT]]></Field>
    *<Field name="Value" type="java.lang.String"><![CDATA[30]]></Field>*
    <Field name="Label" type="java.lang.String"><![CDATA[Oracle Data Integrator Timeout]]></Field>
    <Field name="Type" type="java.lang.String"><![CDATA[com.sunopsis.graphical.userparam.SnpsTextFieldEditor]]></Field>
    <Field name="Help" type="java.lang.String"><![CDATA[Timeout used by Oracle Data Integrator for the database connections.]]></Field>
    <Field name="Visible" type="boolean"><![CDATA[true]]></Field>
    <Field name="Updatable" type="boolean"><![CDATA[true]]></Field>
    <Field name="Position" type="int"><![CDATA[4]]></Field>
    </Object>
    or increase your machine virtual memory
    Regards,
    Phanikanth

  • Processing XML files that contain Special Characters

    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as &Ecirc (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such &Ecirc. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

    Hello,
    I just had the same problem, you need to include the approprate entity sets so that the xsl parser will recognize them (and you won't
    get the "missing entity" error:
    if you already haven't you need to add a DOCTYPE processing instruction for your dtd, to the top of your xml files to be parsed, for ex.:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "file:///mydir/mydtd.dtd">
    then in "mydtd.dtd", add references to these 3 entity sets (if you have a dtd - if not then create one just with these entries):
    <!ENTITY % HTMLlat1 PUBLIC
    "-//W3C//ENTITIES Latin 1 for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
    %HTMLlat1;
    <!ENTITY % HTMLspecial PUBLIC
    "-//W3C//ENTITIES Special for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
    %HTMLspecial;
    <!ENTITY % HTMLsymbol PUBLIC
    "-//W3C//ENTITIES Symbols for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
    %HTMLsymbol;
    Or, grab the ".ent" files from the www.w3.org site and put them on your server in the dtd dir, and change the "http:... reference, to
    "file:...", it will be faster to parse (that's what I did). FYI, "Ecirc" is in xhtml-lat1.ent.
    Also, after I did this,I developed another problem where my xsl parser and xmlmarkup tag-converting function converts certain
    html entities to their octal counterparts, and I don't want this and don't know how to stop it (I have a posting out for this also).
    Additionally, thanks for posting your parseReport method, it just so happens that I was looking for a way to do something like that,
    it should be helpful to me.
    -JK
    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as J (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such J. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

  • Approach needed for processing huge file.using file-jdbc

    Hi,
    My Scenario is file-jdbc. I need to update the records in database table. The size of file would be 500mb.
    1)Will the recordsets per message in the sender side FCC will help me in processing the file? Any other better solution or any configuration needs to be checked on PI system? as processing should be finished in 3 hours time?
    2)i need to update other table with no.of records processed per cycle with time. How to acheive this?
    TIA

    I would suggest you to go for Stored procedures and follow as mentioned below:
    1)Use recordsets per message in the sender side FCC (already mentioned by u)
    2) Create a SP and and pass source payload as xml input to the SP.
    Ur target structure will be something like this:
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    <StatementName>
    <storedProcedureName action=u201D EXECUTEu201D>
    <table>realStoredProcedureeName</table>
    <param1 type=SQLDatatype>val1</param1>
    </storedProcedureName >
    </StatementName>
    pass ur source data as xml input to param1.
    If u r using PI7.1 then chk this:
    http://www.sappi.sapag.co.in/flat-file-to-file-senario/convert-the-input-xml-to-string-in-pi-7-1-using-standard-graphical-mapping-2/
    on the database side parse the string (xml document) and then insert the data in the table.. Chk with ur DB team regarding the same.

  • Need help on XML Publisher Template features

    Hi,
    We have a requirement to develop an Invoice Register report to display the invoices for a period. Details of each Invoice and Amount needs to be displayed in a single line. At the bottom of each page we have to display running total of the Invoices displayed till that page. At the beginning of each page we have to display the total amount of Invoices displayed in the previous page.
    We had developed the report using Reports Builder and registered concurrent program with output type as PDF. We are working in Spanish environment (UTF-8 character set). The report is working properly and producing output as required. But Spanish characters appear as junk character on the report. From Metalink Notes 443778.1 and 338990.1, I understand that PDF output in UTF-8 character set is not supported. We need to use XML Publisher to generate the PDF output.
    We have developed .rtf template. It is generating PDF output and Spanish characters appearing properly. But we are not able to get the running total at the bottom of each page or total of previous page amounts at the beginning of each page. In the output from Reports Builder, we could use various page level options (like reset at page level, etc.) to achieve the requirement. But in the template generated using .rtf, I do not have such options.
    I am not sure if there are advanced features in .rtf template to achieve the requirement. Could anyone please advise me how I can achieve the requirement? It would be great if you could provide me some reference.
    Thanks and Regards,
    Nabendu

    Hi Nabendu.
    BI publisher does have the option of showing a running total in PDF format usign a RTF template. If you look up the advanced rtf samples provided with the BI publisher plugin there is one example to show running totals, with the previous page total at the top.
    you can find this located on your PC where the Word Plugin is installed. C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\samples\RTF templates
    replace C:\ with the drive leeter of the drive where your desktop plugin is installed
    Hope this Helps,
    Domnic

  • Need help with xml video gallery

    Hello everyone
    I recently bought a xml video gallery. I'm loading the movie externally into another movie. When the xml gallery loads, it cancels all sounds.
    I need to figure out where in the actionscription can i reverse the cancellation of sounds. Can anyone help? if possible, I can email, whomever is willing to help, the xml gallery to see if theres another reason the sound is being canceled.
    Also, the sound of the gallery doesn't work til you click the volume scroller.
    Here are two parts of actionscript included in the gallery:
    part one:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.collection_mc._ x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_mc.main_mc. collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._width));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound();
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

    if you mean sound works well when the gallery is tested without being loaded into another swf but fails when loaded, change the highlighted line:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.colle ction_mc._x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_m c.main_mc.collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._w idth));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound(this);
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

  • Stax reading /writing need help from xml guru plz

    hi, i have been told that stax reading /writing should involve no overhead and that is why i use it and i am now able to write my large data to file, but using my reader i seem to run out of memory, using netbeans profiler i ahve found that char[] seems to be the problem,
    by backtracing i ahve found that javax.xml.parser.SAXParser.parse calls the xerces packages which eventually leads to the char[ ], now my code for my reader is attatched here...
    package utilities;
    import Categorise.Collection;
    import Categorise.Comparison;
    import Categorise.TestCollection;
    import java.io.IOException;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.Attributes;
    import java.io.File;
    import java.util.ArrayList;
    import java.util.List;
    import measures.Protocol;
    * @author dthomas
    public class XMLParser extends DefaultHandler
        static Collection collection = new Collection();
        List<Short> cList;
        List<Comparison> comparisonList;
        File trainFileName;
        File testFileName;
        TestCollection tc;
        List<TestCollection> testCollectionList;
        List<File> testFileNameList = new ArrayList<File>();
        List<File> trainFileNameList = new ArrayList<File>();
        boolean allTrainsAdded = false;
        Protocol protocol;
        List<File> trainingDirList;
        File testingDir;
        int counter = 0;
        File[ ] trainingDirs;
        File[ ] trainingFileNames;
        File[ ] testFileNames;
        TestCollection[ ] testCollections;
        Comparison[ ] comparisons;
        Comparison c;
        short[ ] cCounts;
        String order;
        String value;
        File trainDir;
        /** Creates a new instance of XMLParser */
        public XMLParser() {
        public static Collection read( File aFile )
            long startTime = System.currentTimeMillis();
            System.out.println( "Reading XML..." );
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp;
            try {
                sp = spf.newSAXParser();
                sp.parse( aFile, new XMLParser() );
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (SAXException ex) {
                ex.printStackTrace();
            } catch (ParserConfigurationException ex) {
                ex.printStackTrace();
            long endTime = System.currentTimeMillis();
            long totalTime = ( endTime - startTime ) / 1000;
            System.out.println( "Done..."  + totalTime + " seconds" );
            return collection;
        public void startElement(String uri,String localName,String qName, Attributes attributes)
            if( qName.equals( "RE" ) )
                testCollectionList = new ArrayList<TestCollection>();
            else if( qName.equals( "p") )
                boolean isConcatenated = new Boolean( attributes.getValue( "c" ) );
                boolean isStatic = new Boolean( attributes.getValue( "s" ) );
                protocol = new Protocol( isConcatenated, isStatic );
            else if( qName.equals( "trdl" ) )
                trainingDirList = new ArrayList<File>();
            else if( qName.equals( "trd" ) )
                trainDir = new File( attributes.getValue( "fn" ) );
                trainingDirList.add( trainDir );
            else if( qName.equals( "td" ) )
                testingDir = new File( attributes.getValue( "fn" ) );
            else if( qName.equals( "TC" ) )
                counter++;
                System.out.println( counter );
                comparisonList = new ArrayList<Comparison>();
                testFileName = new File( attributes.getValue( "tfn" ) );
                testFileNameList.add( testFileName );
                tc = new TestCollection( );
                tc.setTestFileName( testFileName );
            else if ( qName.equals( "r" ) )
             order = attributes.getValue( "o" );
                value = attributes.getValue( "v" );
                cList.add( Short.parseShort( order ), new Short( value ) );
            else if( qName.equals( "c" ) )
                cList = new ArrayList<Short>();
                trainFileName = new File( attributes.getValue( "trfn" ) );
                if( !allTrainsAdded )
                    trainFileNameList.add( trainFileName );
        public void characters(char []ch,int start,int length)
            //String str=new String(ch,start,length);
            //System.out.print(str);
        public void endElement(String uri,String localName,String qName)
            if (qName.equals( "c") )
                allTrainsAdded = true;
                cCounts = new short[ cList.size() ];      
                for( int i = 0; i < cCounts.length; i++ )
                    cCounts[ i ] = cList.get( i );
                c = new Comparison( trainFileName, tc );
                c.setcCounts( cCounts );
                this.comparisonList.add( c );
            else if( qName.equals( "TC" ) )
                comparisons = new Comparison[ comparisonList.size() ];
                comparisonList.toArray( comparisons );           
                tc.setComparisons( comparisons );
                testCollectionList.add( tc );
            else if( qName.equals( "RE" ) )
                testCollections = new TestCollection[ testCollectionList.size() ];
                testCollectionList.toArray( testCollections );
                collection.setTestCollections( testCollections );
                testFileNames = new File[ testFileNameList.size() ];
                testFileNameList.toArray( testFileNames );
                collection.setTestingFiles( testFileNames );
                //String[ ] testCategories = new String[ testCategoryList.size() ];
                //testCategoryList.toArray( testCategories );
                //collection.setTestCategories( testCategories );
                trainingFileNames = new File[ trainFileNameList.size() ];
                trainFileNameList.toArray( trainingFileNames );
                collection.setTrainingFiles( trainingFileNames );
                //String[ ] trainingCategories = new String[ trainCategoryList.size() ];
                //trainCategoryList.toArray( trainingCategories );
                //collection.setTrainingCategories( trainingCategories );
                collection.setProtocol( protocol );
                trainingDirs = new File[ trainingDirList.size() ];
                trainingDirList.toArray( trainingDirs );           
                collection.setTrainingDirs( trainingDirs );
                collection.setTestingDir( testingDir );
         //else
             //System.out.println("End element:   {" + uri + "}" + localName);
    }i thought it may have been a recursive problme, hence having so many instance variables instead of local ones but that hasn't helped.
    all i need at the end of this is a Collection which holds an array of testCollections, which holds an array of cCounts and i was able to hold all of this in memory as all i am loading is what was in memory before it was written.
    can someone plz help
    ps when i use tail in unix to read the end of the xml file it doesnt work correctly as i cannot specify the number of lines to show, it shows all of the file as thought it is not split into lines or contains new line chars or anything, it is stored as one long stream, is this correct??
    here is a snippet of the xml file:
    <TC tfn="
    /homedir/dthomas/Desktop/4News2/output/split3/alt.atheism/53458"><c trfn="/homed
    ir/dthomas/Desktop/4News2/output/split0/alt.atheism/53586"><r o="0" v="0"></r><r
    o="1" v="724"></r><r o="2" v="640"></r><r o="3" v="413"></r><r o="4" v="245"></
    r><r o="5" v="148"></r><r o="6" v="82"></r><r o="7" v="52"></r><r o="8" v="40"><
    /r><r o="9" v="30"></r><r o="10" v="22"></r><r o="11" v="16"></r><r o="12" v="11
    "></r><r o="13" v="8"></r><r o="14" v="5"></r><r o="15" v="2"></r></c><c trfn="/
    homedir/dthomas/Desktop/4News2/output/split0/alt.atheism/53495"><r o="0" v="0"><
    /r><r o="1" v="720"></r><r o="2" v="589"></r><r o="3" v="349"></r><r o="
    please if anyone has any ideas from this code why a char[] would use 50% of the memory taken, and that the average age seems to show that the same one continues to grow..
    thanks in advance
    danny =)

    hi, i am still having lo luck with reading the xml data back into memory, as i have said before, the netbeans profiler is telling me it is a char[] that is using 50% of the memory but i cannot see how a char[] is created, my code doesn't so it must be the xml code...plz help

  • Need Help in Sender File Content Conversion

    Hi All,
    I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".
    Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.
    ABC LAB            XYZ LIMITED"
                       TRIAL BALANCE"
                       FOR THE PERIOD ENDED DECEMBER 2009"
    "TEST Bank","101000",-1589365.58,0.00,738295.08,0.00
    "TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00
    "TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00
    "TEST Receipts","101260",0.00,0.00,19788596.15,0.00
    "TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00
    "SHARES","00SH",0.00,0.00,-7869890086.22,0.00
    "END OF REPORT"

    Dear Phani,
    Please go through the below blogs:
    File content conversion sites
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Please see the below links for file content conversion..
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    File Content Conversion for Unequal Number of Columns
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    Thanks,
    Satya

  • Need help with XML Conversion

    I have a very large unstructured document that I need to convert to XML. This document once had a structure applied to it but somehow this structure was deleted (not by me). Since the structure was deleted, a fair amount of content has been added to the file.
    Ive been reading through PDF help files and trying to figure out how to solve this problem. I am very new to this so any help or input would really be great.
    So far thoughts on converting to XML are:
    1) Get structure back working in the original file. I do not know if there is a way to transfer the structure Pre-Loss to the new file. I have created a conversion table already that I can use. I have ran the CT and created what seems to be a structured document, but I think I may be missing further steps.
    2) Export the element definitions to an EDD
    3) Convert the EDD to a DTD
    4) Create a template file (not sure how to do this?)
    Finally export to XML. Before I start on this some feedback would be very welcomed. Sorry I am very inexperienced with all of this.

    Hello Frank,
    with the conversion there is a problem concering the graphics/ xrefs.
    after you have created the conversion table and structured your document you now can
    save the document as xml file.
    In the output you then will still have all graphics that are in the document, but the xrefs are missing.
    convert the document via StructureTools > Utilities > Convert Documents to Structured Format.
    In the output you then will have all the xrefs, but the graphics are missing.
    However, it's possible that I'm not up-to-date her as I haven't tried this since quite some time now.
    Point 2 and 3 from your list:
    Normally it's the other way around: You have a DTD and import that as a new EDD file in FrameMaker.
    Also I don't think that there really is a possiblity to export any element definitions from FrameMaker. But I'm happy, if you are able to disabuse me here.
    Template file:
    Any FM file. It just contains the page layout and the character formats etc.
    What you need to do is to add a Structured Application containing all the information on where to find the Template, EDD, DTD and also the read and write rules.
    With FrameMaker there are several Structured Applications delivered, e.g. DITA.
    If you do not have enough experience to create a new structured application without any model, it's best to copy and modify one of these.
    Regards,
    Anna

Maybe you are looking for