Selecting specific instance of XML element for binding

I am trying to create a form that will display ratesheets used to show mortgage rates.  We have an XML schema defined that has multiple rates for multiple products.  The rates change continuously. I want to create a static PDF by combining a form and an XML input.
In the PDF, I always want the rates for a given product in the same location.  For instance, 30 year fixed on page 1, upper left, 5/1 arm on page 2, upper right, etc.  Each of these products has a predefined static product code.
The ratesheet schema has the following definition for the product element:
So, how can I specify that a subform bind to where prod_cd=02, or 21, whatever?

No, I don't want different fields on different pages. I want column 1 to show rlock15, rlock30, rlock60 where prod_cd=02. In column 2, I want to show rlock15, rlock30, rlock60 where prod_cd=21 So, I want the same field ($record.ratesheetline.rlock30), but different instances. So, I need to be able to create a subform that selects something like $record.ratesheetline.code='02', and then display the above fields for that specified instance.

Similar Messages

  • Set xml element for table

    Hi guys,
    I am new to indesign scripting using applescript.
    my code is shown in below, my problem is can't set xml element for table
    tell application "Adobe InDesign CS6"
            tell active document
                set rootele to associated XML element of story 1
                if rootele = nothing then
                    set rootele to XML element 1
                end if
                tell story 1
                    select text 1
                    set markup tag of selection to "table" -----------------> this is my problem please help me.
                              end tell
            end tell
        end tell
    this code is right or not. please help me.

    The metadata about the table mappings are also stored in the compiled XML Schema document. If you lookup the schema document located at /sys/schemas/.... , you will see that the element with SQLInline=false will have a xdb:defaultTable attribute which provides the name of the table used to store the element.
    - Ravi

  • Selecting the content of XML element CS3(JS)

    Hi
    I am trying to select the whole content of XML Element.
    I am trying like this
    app.activeDocument.xmlElements[i].select();
    But it is not working.
    Regards
    Suresh

    A few hints:
    Perhaps your variable
    i i
    is not defined. If that's the case, give up trying to write code for this complicated job! XML is not the easiest part of ID to begin with. Starting with uninitialized variables and flagging that as an error (and complaining about that in a forum) is a beginners' blunder.
    If I run your script line with i set to 0, the first element of my XML structure is selected. I can see with my own eyes it works, because I have the XML Structure pane in ID open. If I click on the 2nd element there and run your script line, the top (= 0th) element is selected. Perhaps you didn't open the XML Structure view so you did not see it worked after all. Or perhaps you expected something
    i else
    to be selected -- the text content, maybe -- so you tag it as "error". That's a misinterpretation of what the XmlElement object is. Understandable, but still not an error. You can have lots of XmlElements without any text or other object associated. If it was your intention to select whatever the xml element contains, try working with the property 'xmlContent'. From its description I gather that sort-of does this alternative interpretation, i.e., you can select the
    i text
    which is pointed to by the element. Untried. But do read on.
    If I run your script with i = 1, I
    i do
    get an error, and it's perfectly valid too! "Object is invalid" -- well, of course it is. There is no other XML element at that level. An app.document.xmlelements entry always points to the
    i root
    of the XML, and you can only have one. Perhaps you expected #1 to be the next sub-element. Well, not so in the ID implementation -- as usual for almost all XML based structures, it's a tree. The "next" element is xmlElements[0].xmlElements[0], which you can check by changing your line to
    >app.activeDocument.xmlElements[0].xmlElements[0].select();
    and verifying the 2nd element from the top is selected in the XML Structure view.

  • How to select specific rows in rtf template for complex calculation

    Hi,
    I want custom calculation in my rtf template and for this i need to select specific cell's value OR specific row's value. Any one please suggest how can I get this. Below is the example i have plotted using excel. My target is to get field 8 and 9 using sum and minus. We can calculate column over column, is there any way to calculate row over row? If I use variables, then i have to create so many variables because I have more columns and rows to calculate (here i posted one sample table). Any one please help me how can I get expected result other than using variables! If "Using variables" is the only way then also give your valuable opinions.
    Row No
    Curr Qtr
    PQtr1
    PQtr2
    3
    B3
    C3
    D3
    4
    B4
    C4
    D4
    5
    B5
    C5
    D5
    6
    B6
    C6
    D6
    7
    B7
    C7
    D7
    8
    B8=SUM(B4:B7)
    C8=SUM(C4:C7)
    D8=SUM(D4:D7)
    9
    B9=B8-B5
    C9=C8-C5
    D9=D8-D5
    Thanks.

    Hi AlexAnd,
    Thanks for the reply, I got 0 using both codes. This is a dummy table and I plotted 3,4 to give an idea of row number (as like as excel). Rows are individual data sets combining different measures and dimensions with different values.
    Account
    Curr_Qtr
    PQtr1
    PQtr2
    Deposit
    10
    15
    20
    Loan
    15
    20
    25
    Earning
    20
    25
    30
    Assets
    25
    30
    35
    Total
    =SUM(15,20)
    =SUM(20,25)
    =SUM(25,30)
    Expense
    =SUM(15,20)-25
    =SUM(20,25-30
    =SUM(15,20)-25
    Is there any way to identify the range or individual cell's value? Using variables I have to create lots of variables for each cells, I want to avoid that and want to use rows in calculation! Is that possible, Pls share your valuable opinions!
    Thanks.

  • Select specific folder while install DP for SCCM 2012 R2

    Hi All,
    I have two Question:
    1- Is there any option to select specific folder like "C:\Windows\DP Packages\" to include all folders for Distribution Point (SCCMContentLib.....) -- Can we use Hidden folder?
    2- Can we Limit Distribution point to Use only specific storage Like 50 GB from disk?
    Thanks.

    1) Out of the box No. The contentlibrary will be created in the root of the drive by default
    2) When creating the DP you can configure "Drive Space reserve" available before another drive is selected.
    Kent Agerlund | My blogs: blog.coretech.dk and
    SCUG.DK | Twitter: @Agerlund | Linkedin:
    Kent Agerlund | Author:
    Mastering System Center 2012 R2 The Fundamentals

  • Lining Up XML Elements for Input

    I am transforming an XML document into the proper canonical format for inputting into our Oracle database. I am able to change the attributes into elements. However, when I do so I can't get the new elements to line up in the proper canonical format for insert. Being new, they want to line up flush with the left margin. Is there a way to make them even with the equal level elements?
    XSL:
    <DCCONTROLS>
    <xsl:apply-templates/>
    </DCCONTROLS>
    </xsl:template>
    <xsl:template match="//Geopotential">
    <xsl:element name="GEOPOTENTIAL">
    <xsl:value-of select="node()"/>
    </xsl:element>
    <xsl:element name="ZONAL">
    <xsl:value-of select="@zonal"/>
    </xsl:element>
    <xsl:element name="TESSERAL">
    <xsl:value-of select="@tesseral"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="//AtmoModelDrag">
    <ATMOMODELDRAG>
    <xsl:value-of select="node()"/>
    </ATMOMODELDRAG>
    </xsl:template>
    output XML:
    <DCCONTROLS>
    <GEOPOTENTIAL>EGM-96</GEOPOTENTIAL>
    <ZONAL>36</ZONAL>
    <TESSERAL>36</TESSERAL>
    <ATMOMODELDRAG>JAC70/MSIS90</ATMOMODELDRAG>
    </DCCONTROLS>
    As you can see, ZONAL and TESSERAL don't line up properly. I would appreciate any suggestions as I've tried about everything I can think of. Thank you.

    The whitespace (i.e. indenting) is unimportant for the canonical format, just the correct nested element structure.
    Also, there is no need to use the "//" at the beginning of the match pattern in your <xsl:template> it's already understood that this will match a <Geopotential> element wherever it occurs.
    null

  • How to create a xml element for Text with Java?

    Hi @ all,
    I want to tag a part of a text with Java.
    Like the InDesign function "Tag für Text" (maybe "tag for text" in english)
    Is there a way to tag text with Java?
    I tried to autoTag and to markup the text with an existing xml, but only got IdsExceptions.
    here the code where to tag the text:
    XMLElement newXML = parentXML.addXMLElement(VariableTypeUtils.createString("newXML"),OptArg.noVariableType());
    Text[] texts = para.findText(OptArg.noBoolean());
    for (Text text : texts)
       //TODO tag text
    Exception throwing code:
    text.autoTag();
    text.markup(newXML);
    newXML.markup(VariableTypeUtils.createObject(text));

    This is not a Web Dynpro specific question. This forum is for Web Dynpro specifc development aspects. There are other forums for general ABAP development as well as other specific aspects of ABAP development.
    I strong suggest that you review the rules of engagement for forum involvement, Derek.  You have had multiple violations of the rules in the last week.

  • Adding text to parentStory destroys XML element / JavaScript, InD CS4

    Dear scripters,
    I'm currently stuck with this problem:
    - I'm writing text to text frames on a layout page
    - while writing some characters/strings are XML tagged (I'm creating an element)
    - I can do this only once, because adding more text after I have created an XML element destroys the link to the element
    Here's my sample:
    var MyBox = app.activeDocument.textFrames.add();
    MyBox.geometricBounds = ["0pt","0pt", "200pt", "200pt"];
    //Fill some content into the text frame
    MyBox.parentStory.contents = "bla";
    //create a xml element for some of the text
    app.activeDocument.xmlElements.item(0).xmlElements.add("test1", MyBox.parentStory.characters.itemByRange(1, 2));
    //so far so good...
    //now some calculating
    var result = "456";
    //add result to the text frame
    //doing this destroys the link to the existing xml element
    MyBox.parentStory.contents += result;
    //doing this creates a new xml element with the wrong characters selected and linked
    app.activeDocument.xmlElements.item(0).xmlElements.add("test2" , MyBox.parentStory.characters.itemByRange(4, 2));
    Can someone please help on?
    Best regards,
    TYPO

    Hello Harbs,
    thank you, it almost works now; the xml element brackets are not destroyed anymore.
    The only problem I have now is that the second element becomes a  child of the first one.
    How can I force each element to  be "independent"?
    Here's the code:
    var MyBox = app.activeDocument.textFrames.add();
    MyBox.geometricBounds = ["0pt","0pt", "200pt", "200pt"];
    var MyContent = "bla";
    MyBox.parentStory.insertionPoints[-1].contents = MyContent;
    MyBox.parentStory.characters.itemByRange(-1, -MyContent.length).select();
    app.activeDocument.xmlElements.item(0).xmlElements.add("test1" ,app.activeDocument.selection[0]);
    MyContent = "456";
    MyBox.parentStory.insertionPoints[-1].contents = MyContent;
    MyBox.parentStory.characters.itemByRange(-1, -MyContent.length).select();
    app.activeDocument.xmlElements.item(0).xmlElements.add("test2" ,app.activeDocument.selection[0]);
    Best regards,
    TYPO

  • How to find out the page number of an xml element

    Hi everybody, sorry for my very bad english (french guy! logical). I hope you see what I'm looking for.
    I'm scripting (javascript) an exporting script of every articles from a multi-pages indesign script.
    In fact I could have one or more article in one file, every one of them is on an separate xml element. for each I have to export an xml file named with, first, the page number where appears the xml element, second, the number of exported article.
    I'm success the second purpose, but not the first.
    Someone have an idea ?

    Try this,
    var myDoc=app.activeDocument;
    var root = myDoc.xmlElements[0];
    var docTag = root.evaluateXPathExpression('//doc');
    for(i=0; i<docTag.length; i++)
        var docPos = docTag[i].insertionPoints.lastItem();
        var docFrame = docPos.parentTextFrames[0];
        var docPage;
        try
             docPage = docFrame.parentPage;
    catch(e)
            docPage = docFrame.parent.name;
        alert(docPage.name);
    Vandy

  • XML element in image URL

    Hi All,
    I used this to get dynamic URL resolution for logo on my report.
    Simple url:{'http://localhost/logo.jpg'} works just fine for HTML output.
    But once I use XML element for URL resolution it does nothing...
    url:{concat('http://',FILE_PATH)} returns just 'http://' without value from FILE_PATH element.
    Needles to say, that FILE_PATH element on report itself does the job and presents path to the image.
    What I am doing wrong?
    Thank you.

    Have a look at this .
    Re: problem with dynamic image
    or
    simple use
    url:{concat('http://',.//FILE_PATH}

  • Choosing paper type in Photoshop Elements for mac

    How do I select paper type in PS elements for Mac OS Lion 10.7?

    You do this in the OS X print window that appears after you click Print in the PSE print window. You may need to expand the window by clicking the Show Details button, and then you'll see a pulldown menu in the middle of the window where you make your choices for paper, ink, etc.

  • Getting XML Elements

    I am returning some XML elements(for example Figure elements) using Xpath in Javascript, which is assingned to one object in VB.net. There is no problem when i am getting(those elements) from CS5.5 Document but while i am getting from CS3 document it shows COM Object error. My code is as follows.
            SerializedObject.IApplication = CreateObject("InDesign.Application.CS3")
            Dim a As Object = SerializedObject.IApplication.DoScript("C:\Documents and Settings\pg4007\Desktop\scripts\Find_Float_Element.jsx", InDesign.idScriptLanguage.idJavascript, )
    it shows,
    Error HRESULT E_FAIL has been returned from a call to a COM component.
    Plz help me.

    The code creates two paragraph styles namely Element_A_01 and Element_B_02. These two are created for the immediate child nodes of the Workbook node. Now it seems that you are trying to create pstyles for all the nodes in the XML, which in your case would still be these two as Element_A_01 has a child node that is also named Element_A_01 and the same is the case for Element_B_02.
    If i get your point right then you need to create 4 pstyles if all the nodes have different names, but that is not working. For this you will have to recursively traverse each node that you get from the code xes[n].
    The code be something like this
    function main() {   
      var xes, n, doc, ps, xe;   
      if ( !app.documents.length ) return;   
      doc = app.activeDocument; 
      xes = doc.xmlElements[0].xmlElements; //This gives the immediate child nodes of the Workbook node, hence the length in the next statement is 2  
      n = xes.length;   
      while ( n-- ) {   
      xe = xes[n];   //Here you need to recursively traverse the node xe
      //The no of child elements of xe can be obtained as xe.xmlElements.length
      //First element can be obtained by xe.xmlElements[0]
    main();
    Hope this solves the issue

  • How to select specific element from a XML document using JDBC?

    Hi all,
    I have a problem with selecting specific XML element in Oracle 11g release 1 from my java application. Data are stored in object-relational storage.
    My file looks like:
    <students>
    <student id="1">
    </student>
    <student id="2">
    </student>
    <student id="3">
    </student>
    </students>
    I need to select a specific <student> element. I've already tried few ways to achieve my goal but I failed.
    SELECT extract(OBJECT_VALUE,'/students/student') FROM students - works fine, but this selects all <student> elements
    SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students - which should select first <student> element works too but it causes exception when using JDBC driver returns:
    java.sql.SQLException: Only LOB or String Storage is supported in Thin XMLType
         at oracle.xdb.XMLType.processThin(XMLType.java:2817)
         at oracle.xdb.XMLType.<init>(XMLType.java:1238)
         at oracle.xdb.XMLType.createXML(XMLType.java:698)
         at oracle.xdb.XMLType.createXML(XMLType.java:676)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:45)
    SELECT to_clob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - in this case I hoped that DB would convert result to CLOB but the element is quite large (definitely more than 4000 Bytes long which I find out from forum is limit). But this exception occurs:
    java.sql.SQLException: ORA-19011: Character string buffer too small
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:897)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    SELECT to_lob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - I hoped I can convert return value to a LOB value but that doesn't work for me either:
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected -, got -
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    This behaviour raises two questions:
    1) Why SELECT extract(OBJECT_VALUE,'/students/student') FROM students works but SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students does't ?
    2) Is there any way how I can select specific element (element XPath /students/student[@id="some value"]) and convert it to String?
    Thanks for your responses I would appreciate any suggestion
    Honza

    To be exact my <student> element is a bit complicated and looks like the one at the end of this post (sorry but it's in czech). And I need to select whole xml fragment (all opening and closing tags included) as it is shown. Maybe I used wrong solution and I should use CLOB storage. I discuss this issue here: Which solution for better perfomance?
    Thanks anyway for your response. I would be very grateful if you have any further idea
    <Student RodneCislo="8051015555">
                   <Jmeno>Petra</Jmeno>
                   <Prijmeni>Nováková</Prijmeni>
                   <RodnePrijmeni>Novotná</RodnePrijmeni>
                   <TitulPred>Bc.</TitulPred>
                   <TitulZa>MBA.</TitulZa>
                   <Adresa>
                        <Okres>3702</Okres>
                        <Obec>582786</Obec>
                        <CastObce>11908</CastObce>
                        <Ulice>Nova</Ulice>
                        <UliceCislo>4</UliceCislo>
                        <PSC>60000</PSC>
                        <Stat>203</Stat>
                   </Adresa>
                   <RodinnyStav>1</RodinnyStav>
                   <StredniSkola>000559024</StredniSkola>
                   <RokMatZkousky>2001</RokMatZkousky>
                   <PPStudent DatumVerifikace="2006-08-04">
                        <SoubeznaStudia>1</SoubeznaStudia>
                        <SoubeznaStudiaMaxDelka>2.0</SoubeznaStudiaMaxDelka>
                        <CelkovaDobaStudia>1817</CelkovaDobaStudia>
                   </PPStudent>
                   <Studia>
                        <Studium VSFakulta="14330" StudijniProgram="B1801" ZapisDoStudia="2001-07-10">
                             <DelkaStudia>5.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>N</NavazujiciStudProgram>
                   <PredchoziVzdelani>K</PredchoziVzdelani>
                             <PocetRocniku>5</PocetRocniku>
                             <AktualniRocnik>5</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <UkonceniStudia Datum="2004-06-28" Zpusob="1" UdelenyTitul="Bc."/>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2001-07-10">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-04-24</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-04-24">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <StudijniPobyt Forma="V" Program="51" Stat="056"/>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-09-01</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-09-01">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2004-06-28</PlatnostDo>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                        <Studium VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29">
                             <DelkaStudia>2.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>A</NavazujiciStudProgram>
                             <PredchoziVzdelani>R</PredchoziVzdelani>
                             <PocetRocniku>2</PocetRocniku>
                             <AktualniRocnik>1</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <SocialniStipendia>
                                  <SocialniStipendium NarokOd="2006-01-01">
    <NarokDo>2006-10-30</NarokDo>
                                  </SocialniStipendium>
                             </SocialniStipendia>
                             <UkonceniStudia Datum="" Zpusob="" UdelenyTitul=""/>
                             <PPStudium DatumVerifikace="2006-07-01">
                                  <NovePrijatyVerif>N</NovePrijatyVerif>
                                  <NovePrijatyKvalif>N</NovePrijatyKvalif>
                                  <NavazujiciStudProgramVerif>A</NavazujiciStudProgramVerif>
                                  <UkonceniStudiaVerif/>
                                  <FinancovanoCR>A</FinancovanoCR>
                                  <SberId>38</SberId>
                                  <DobaStudia>
                                       <Cista>733</Cista>
                                       <VcetneNeuspechuDanehoTypu>733</VcetneNeuspechuDanehoTypu>
                                       <VcetneVsechNeuspechu>733</VcetneVsechNeuspechu>
                                  </DobaStudia>
                                  <PrestoupenoKamPosledni VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29"/>
                                  <UbytovaciStipendiumKod/>
                             </PPStudium>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2004-06-29">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>eng</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801T001</Obor>
                                            <Obor>1801T025</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo/>
                                       <PPStudiumEtapa DatumVerifikace="2006-07-01">
                                            <FinancovaniVerif>1</FinancovaniVerif>
                                            <StudentRozpoctovy>O</StudentRozpoctovy>
                                            <SberId>38</SberId>
                                       </PPStudiumEtapa>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                   </Studia>
              </Student>

  • Efficient searching in a large XML file for specific elements

    Hi
    How can I search in a large XML file for a specific element efficiently (fast and memory savvy?) I have a large (approximately 32MB with about 140,000 main elements) XML file and I have to search through it for specific elements. What stable and production-ready open source tools are available for such tasks? I think PDOM is a solution but I can't find any well-known and stable implementations on the web.
    Thanks in advance,
    Behrang Saeedzadeh.

    The problem with DOM parsers is that the whole document needs to be parsed!
    So with large documents this uses up a lot of memory.
    I suggest you look at sometthing like a pull parser (Piccolo or MPX1) which is a fast parser that is program driven and not event driven like SAX. This has the advantage of not needing to remember your state between events.
    I have used Piccolo to extract events from large xml based log files.
    Carl.

  • SELECT Fails for a WITHIN clause if the xml element have a DASH

    I am using a context index on a CLOB Column and one of my records is like this.
    ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    When I run a query
    SELECT * FROM identity_event
    WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
    All my other xml elements works just fine.
    I get this error.
    [1]: (Error): ORA-12801: error signaled in parallel query server P003, instance maralpinor03.trogdor.com:maralpin3 (3) ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: Oracle Text error: DRG-50901: text query parser syntax error on line 1, column 24

    The dash or hyphen (-) has special meaning to Oracle text. It means MINUS. Any time that you want Oracle Text to treat such a special character as regular text, you need to escape it, either by putting a backslash (\) in front of each special character or by enclosing a whole word or phrase within curly brackets ({}). Please see the demonstration below.
    SCOTT@10gXE> CREATE TABLE identity_event
      2    (identityeventdata  CLOB)
      3  /
    Table created.
    SCOTT@10gXE> INSERT INTO identity_event VALUES
      2  ('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      3  <cid-spf xmlns="java:com.verid.ident">
      4  <tran-id>1020022445889</tran-id>
      5  <tran-time>1187984936000</tran-time>
      6  <mode>3</mode>
      7  <spoofer>
      8  <name/>
      9  <ph>
    10  <number>12106337000</number>
    11  </ph>
    12  </spoofer>
    13  <spfd>
    14  <name/>
    15  <ph>
    16  <number>13173708869</number>
    17  </ph>
    18  </spfd>
    19  <st-time>1187984936000</st-time>
    20  <dest-number>12106878012</dest-number>
    21  </cid-spf>')
    22  /
    1 row created.
    SCOTT@10gXE> CREATE INDEX your_index ON identity_event (identityeventdata)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('FILTER        CTXSYS.NULL_FILTER
      5        SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
      6  /
    Index created.
    SCOTT@10gXE> -- wrong:
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
      3  /
    SELECT * FROM identity_event
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 24
    SCOTT@10gXE> -- correct:
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187984936000 WITHIN {ST-TIME}')>0
      3  /
    IDENTITYEVENTDATA
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187984936000 WITHIN ST\-TIME')>0
      3  /
    IDENTITYEVENTDATA
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    SCOTT@10gXE>

Maybe you are looking for