Searching and Summing Based on XML Tags

I'm considering storing XML documents in CLOB fields and using interMedia to manipulate them. Is it possible to search the XML and answer questions like "how many documents were produced in Illinois in the month of June 2000?" where <STATE> and <CREATE DATE> are XML tags? If so, how efficient is this? Would it be better to store likely search or grouping attributes as separate columns?
Any thoughts, experiences would be appreciated.
Byron Lee
null

You can do this using WITHIN. Putting the structured information into the text document is, in effect, denormalizing the schema, and can have big performance benefits. The problem is that interMedia Text doesn't do range-searching, so you can query on June within the date tag, but can't say '< July 1'. You might want to leave the structured information in separate columns, and dynamically add them to the text document as xml tags using the user-datastore.

Similar Messages

  • Create URL,Telephone number as paramater Account Search and result based on parameter of telephone number ?

    Hi Experts,
    create URL,Telephone number as paramater Account Search and result based on parameter of telephone number ?..
    Previous my thread was locked...Now i want to say thanks to KALYANI L and Richa Dameja,..Now This code i have followed now its working fine..Thanks Great help to Kalyani L..and Richa Dameja.. i have implemented the DO_INIT_CONTEXT.....Now getting result...
    As suggest Kalyani L i have implemented DO_INTI_CONTEXT method,Now its working fine....
    Thanks For support.
    Thanks
    kalpana
    Message was edited by: Andrei Vishnevsky
    Disussion is locked.
    Reason: Re: create URL,Telephone number as paramater Account Search and result based on parameter of telephone number ?

    Hello Kalpana,
    I've already locked your previous discussion and thought that I gave pretty clear warning.
    First of all "do my job" posts are not welcomed on SCN.
    Second point: you're incorrect in choosing SCN space with such questions. Here is a little which is related to IC in your task.
    Third point is that if somebody has an answer to your exact question then he will give you it if he wants. There is no reason to post-post-post messages asking for help or hurry. Your "urgent requirement" is not the reason either.
    Fourth one is: according to The SCN Rules of Engagement you need to do the search before posting. Almost all of your questions regarding this topic has an answer already.
    Locking the discussion again. If you continue to post such questions I will need to report this situation to SAP CRM space editors and global moderators.

  • How can I add text to a field based on XML tagging?

    I'm fairly new to using XML in InDesign layouts, and I'm currently facing an issue getting a bunch of content from database records formatted in a print document (text that flows over dozens of pages). I've figured out how to create an InDesign template, but I need to be able to add text between some of the XML elements in two different scenarios:
    1. Add text or line breaks before or after an XML element that always appears in the document. For example: Adding "Description:" before the XML-tagged description content, or adding a return after the last element in a list.
    2. Add text before or after an XML element only if it appears in the document. For example: If there's a second phone number, tagged "Phone2" in the XML, then I want " or " to appear before it in the layout. Otherwise there's just one phone number and it continues on to the next piece of content.
    I have tried inserting this text into the InDesign template, but keeping them means having to also keep parts of the template that aren't used on every import--so I have a bunch of "or Phone2" bits of text to find and replace afterward. That's OK, but I'd like a more elegant solution that doesn't leave potential mistakes in my layout.
    In my preliminary research so far, it looks like an XSLT or scripting might be able to handle this, but I don't know where to start. Can someone tell me if what I'm looking for is possible and suggest the best way to do it? I'm going to have to trial-and-error a solution for this myself.
    I am using ID CS6 on a Mac. Thanks in advance for your help.

    Thanks for your reply. The line that you mention is added at the top of the message, and includes the original sender's email. I would like my name to appear, next to each line I add in the text of the original mail.
    For example:
    Assuming my name is Joe Smith, what I would like to have as the final reply is described below.
    The lines that start with "[Joe Smith]" are my replies, to the original items in the original mail.
    On 21 Feb 2013, at 09:03, Jon Doe wrote:
    We need an effort estimation for thenew feature
    [Joe Smith] It will be about 2 days
    and additional resources needed
    [Joe Smith] 2 new icons

  • Reading a xml file and Extract content of xml tags

    Hi,
    I need a InDesign script to Extract content of xml tags by reading a local xml file. And stamping the content of xml on InDesign Text frame.
    My sample xml is as follows .
    <events type="array">
    <event> 
    <aktiv_jn>J</aktiv_jn> 
    <enetpulse_id>1712408</enetpulse_id>
    <event_id>65974</event_id>
    <hjemmehold>AZ Alkmaar</hjemmehold>
    <id>93</id>
    <kickoff>2014-08-17T12:30:00+01:00</kickoff>
    <land_id>140</land_id>
    <land_navn>Holland</land_navn>
    <liga_id>13684</liga_id>
    <liga_navn>Eredivisie</liga_navn>
    <livebetting_jn>J</livebetting_jn>
    <marked_id>2897740</marked_id>
    <marked_nummer>138</marked_nummer>
    <marked_tekst>AZ Alkmaar - Ajax</marked_tekst>
    <moderkamp_jn>J</moderkamp_jn>
    <ob_bet_type>MR</ob_bet_type>
    <odds_1>2.95</odds_1>
    <odds_2>2.25</odds_2>
    <odds_x>3.35</odds_x>
    <program_slut>2014-08-18T23:59:00+01:00</program_slut>
    <program_start>2014-08-15T00:00:00+01:00</program_start>
    <resultat>2</resultat>
    <spilstop_dato_tid>2014-08-17T12:30:00+01:00</spilstop_dato_tid>
    <sport_id>21</sport_id>
    <sport_navn>Fodbold</sport_navn>
    <taerskel nil="true"/>
    <udehold>Ajax</udehold>
    <udfald_1_id>9661951</udfald_1_id>
    <udfald_2_id>9661953</udfald_2_id>
    <udfald_x_id>9661952</udfald_x_id>
    </event>
    </events>
    And on my Indesign Page upon execution of script: I need text like,
    land_navn:     Holland
    odds_1:     2.95
    odds_2:     2.25
    odds_x:     3.35

    Hi,
    Try:

  • How to search and replace in an xml file using java

    Hi all,
    I am new to java and Xml Programming.
    I have to search and replace a value Suresh with some other name in the below xml file.
    Any help of code in java it is of great help,and its very urgent.
    I am using java swings for generating two text boxes and a button but i am not able to search in the xml file thru the values that are entered into these text boxes.
    Thanks in advance.
    **XML File*
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <student>
    <stud_name>Suresh</stud_name>
    <stud_age>40</stud_age>
    </student>Also i am using SAX Parser in the java program
    any help of code or any tutorials for sax parisng is very urgent please help me to resolve this problem
    Edited by: Karthik84 on Aug 19, 2008 1:45 AM
    Edited by: Karthik84 on Aug 19, 2008 3:15 AM

    Using XPath to locate the elements you are after is very easy.
    Try something like this:
    import java.io.File;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class BasicXMLReplaceWithDOM4J {
         static String inputFile = "C:/student.xml";
         static String outputFile = "C:/studentRenamed.xml";
         public static void main(String[] args) throws Exception {
              // Read xml and build a DOM document
              Document doc = DocumentBuilderFactory.newInstance()
                        .newDocumentBuilder().parse(new InputSource(inputFile));
              // Use XPath to find all nodes where student is named 'Suresh'
              XPath xpath = XPathFactory.newInstance().newXPath();
              NodeList nodes = (NodeList)xpath
                   .evaluate("//stud_name[text()='Suresh']", doc, XPathConstants.NODESET);
              // Rename these nodes
              for (int idx = 0; idx < nodes.getLength(); idx++) {
                   nodes.item(idx).setTextContent("Suresh-Renamed");
              // Write the DOM document to the file
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(new DOMSource(doc), new StreamResult(new File(outputFile)));
    }- Roy

  • Display and Edit Patterns in XML Tags

    Using LiveCycle E2 V9.
    The display and or Edit Patterns are not reflected in the XML of a submitted form.
    While these display properly on the Adobe form on-screen, e.g.
    $150,000.00 when the fields are are submitted the XML tag as reflects 150000.000000
    Please advise whether there is something that I am doing incorrectly and or a fix for this?
    Thank you!

    Formatted displays for numbers is never the same as the actual field value. This approach allows a user to see a formatted numeric value but the data remains as a number in floating point, integer, or binary value for further calculations as a number. If this were to change, then one would need to parse the numeric value as a character string back to a numeric value before performing any calculation.
    There are specific forums for LiveCycle Designer.

  • Table of Contents based on XML Tag

    Hi,
    I have created a catalogue containing over 100 pages.
    All of the pages were populated using an XML file.
    Each page has a Title tag populated through XML
    Is it possible to create a Table of Contents based on the XML tag of Title?

    Perhaps by script (try InDesign Scripting) but ID's own TOC ustility is driven entirely by paragraph styles.

  • What is the best cheap/free search and replace software for .xml files?

    Transferring my iTunes library from PC to Mac I have reached the stage where I want to edit the .xml file from PC file paths to Mac ones - which would be the best preferrably free software to do this on?

    Perhaps my comment in your other thread will help.
    tt2
    PS I don't know about the Mac, but Notepad++ will probably do your search & replace on the PC if you have to edit the XML.
    Message was edited by: turingtest2

  • Script that make search and replace based on external configuration file

    Hello!
    As I have to make a lot of string replacements on text file, I need to write the script that takes values from separate file. It can be on this or other format:
    old;new
    Search_string;Replace_string
    I have searched the web and only found this
    thread  but the script download link on this
    thread does not function (I have played with import-csv and loops, but I think that I have a lack of the Powershell knowledge to realize this).
    Any help would be appreciated.

    One possibility:
    'old;new',
    'Search_string;Replace_string'
    ) | set-content replacements.txt
    $replace = (Get-Content replacements.txt |
    foreach {"replace('{0}','{1}')" -f $_.split(';')}) -join '.'
    $string = 'old stuff Search_string'
    $newstring = Invoke-Expression ('$string.' + $replace)
    $newstring
    new stuff Replace_string
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Newbie trying to analyze code for xml tags

    My problem is that I need to find what xml tags my java files contain. Is there a way to run a search and pull out all xml tags? Thank you.

    you mean you have to find xml tags in .java file. you have to write a program that will read the contents of file and then check for any string that contains < and ends with >. U can use LineNumberReader class for reading a line. besides these u have to take care of comments.
    Regards,
    Gurpreet

  • Add xml tag to specific words in a text frame

    Dear all,
    I'm pretty sure this can't be too much of a hassle, but after hours of experimenting, searching and reading I can't seem to look at it from the right angle. I'm trying to find a way to search for a specific word ('Figure', in my case) in a given text frame, and add a corresponding XML tag to it automatically. I've found plenty of information on how to apply it to a page item as a whole, but from there no approach seems to work. Seeing as I'm fairly new to InDesign scripting, any nudge in the right direction would be an immense help.
    Kind regards and thanks in advance,
    Julian

    Hi Julian,
    Is this you asking?
    var doc = app.activeDocument;
    app.findTextPreferences.findWhat = "figure";
    var found = doc.findText();
    for(var i =0;i<found.length;i++)
            doc.xmlElements[0].xmlElements.add({markupTag:"figure", xmlContent:found[i]});
    Regards,
    Chinna

  • Way to find XML Tag name from RDF

    Hi
    Is there some way by which simply looking at fields in RDF, we can find out what XML Tag will be used by the data shown by it. Actually I am using a RDF's output for my XML report. Finding XML tag for a particular field is difficult job.
    Thanks for your help.
    Regards
    Varun

    Got It :-) Just check the data source of field and that is the XML tag. Thanks

  • Generating xml tags with stored procedure

    Hi Friends,
    I have to create a xml report using procedure .the code is given here to generate xml tags.
    create or replace procedure sri_xml (errbuff out varchar2,
    retcode out number) as
    /* create cursor to fetch the records*/
    cursor c_emp is select empno,
    ename,
    deptno,
    sal,
    job
    from emp;
    begin
    /* first line of xml data should be "<? xml version = "0.1"?>" */
    fnd_file.put_line(fnd_file.output,'<?xml version = "1.0" ?>');
    fnd_file.put_line(fnd_file.output,'<per_emp1>');
    for c in c_emp loop
    /* for each record create a group tag <gemp_name> at start */
    fnd_file.put_line(fnd_file.output,'<G_EMP_NAME>');
    /*EMBEDD DATA BETWEEN XML TAGS */
    fnd_file.put_line(fnd_file.output,'<empno>' || c.empno || '</empno>');
    fnd_file.put_line(fnd_file.output,'<ename>' || c.ename || '</ename>');
    fnd_file.put_line(fnd_file.output,'<sal>' || c.sal || '</sal>');
    fnd_file.put_line(fnd_file.output,'</G_EMP_NAME>');
    end loop;
    fnd_file.put_line(fnd_file.output,'</per_emp1>');
    end;
    i run the procedure in the concurrent program with output mode as text and i got the xml tags as the out put. i have created the template using the data definition and registered them in the xml publisher administer but i am unable to get the out put when i run the concurrent request it is giving the message "AUTHENTICATION FAILED".
    please help me to solve the problem and to get the desired output with desired template.
    thanks in advance,
    siddam

    Hi Siddam,
    Please post your query on BI Publisher forum.
    There are number of folks who can resolve the issue u faced.
    Please go through the bi publisher developers guide and then design the report.
    I am not sure about the process ur following for report development...i think you have to create data defination and rtf layout and then attach it to oracle xml administrator responsibility.
    Ratnesh

  • [JS] Find & Replace attribute in xml tags (InDesign CS4)

    Hi all,
    Can anyone help me please who i can find and change attribute in xml tags (InDesign CS4) files. I have both link tags but its other attribute different but one attribute same. So who i can change attribute preference.
    (1) one is
    (2) second is
    I want change link preference = 0 but only (2 number,  second) screen shoot. First screen shoot preference = 1 as it is.
    I want this but its manually
    Help me please. Thank you so much adv.
    Regard
    snegig

    Hi John Hawkinson,
    Thank you so much for replay. I am try Jeff, absqua code technique it is simply greet. But my problem is that my both tags link preference = 1 same and other link attribute almost same. So i am unable to change attribute.
    John my code below =>
    var doc = app.activeDocument,
    attNodes = doc.xmlElements[0].evaluateXPathExpression("//link[@preference = '1' or @role = 'generated']"), i, l;
    for (i = 0, l = attNodes.length; i < l; i++) {
    attNodes[i].xmlAttributes.item("preference").remove();
    John please update my code.
    Thank you so much adv.
    Regard
    snegig

  • Search for, edit, and delete XML tag (Adobe InDesign Server CS5)

    Hi all,
    I'm working with Indesign Server CS5 and JavaScript, though having some trouble coming up with a solution to a problem...
    I need to build a JS script (called through SOAP) that will enable me to search an InDesign file for a given XML tag.
    Upon finding the XML tag, if the 'action' variable is set to delete, it should delete the tag and its contents.
    If the action is set to edit, it should change the contents of the tag to some user-specified content.
    The primary caveat is that the XML tag is variable, as is the XML structure of the InDesign file.
    Here's what I have in mind, in pseudocode:
    function findXMLTag(tag, action) {
         app.searchForTag(tag);
         if (tagIsFound) {
              if (action == "delete") {
                   tag.delete;
              } else if (action == "edit") {
                   tag.contents = "Updated content";
    Any help would be greatly appreciated!
    Thanks,
    Ben Kay

    'searchForTag' can be implemented as a recursive function.
    Recursion is defined like this: I thought, "I'll just search this forum for 'recursion'." The first post I found was one of my own, suggesting that the poster should search the forum for 'recursion'.
    Here is an example: find the XML Element [<email>]
    And another: Remove xml element using JS[CS3] (read carefully, as the OP got stuck on how to successfully remove an element and continue)
    And one, using XML Rules -- which I'm totally unfamiliar with, but may work for you: Changing Values in XML tags

Maybe you are looking for