Extracting Coordinates for Line String Element

Hello
How do I extract Line String coordinates? I am using Oracle 9i version having locator features and using JAVA Program. Could you please help me to get the co-ordinates by using query.
Thanks in Advance
Senthil

e.carano wrote:
I'm a beginner in using LabVIEW with datafile.
If you want code, you need to tell us your LabVIEW version.
If you have a recent version, you can use a conditional tunnel to simplify the code even more. (see attached 2014 version).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
FilterColumns.png ‏19 KB
FilterColumns.vi ‏10 KB

Similar Messages

  • Looking for a way to find out the x,y coordinates of a string inside a PDF

    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.

    vedmack wrote:
    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.AFAIK, a string of text does not have an (x,y) location inside a PDF file. The location is exists on your screen, and will differ whenever you adjust the resolution of it. Text can have a location when it's stored as an image though, but than it's really the location of a certain number of pixels (not necessarily a string!).

  • Q. Any command-line options for Digimarc and Elements 7 batch file processing?

    Q. Any command-line options for Digimarc and Elements 7 batch file processing?

    Are you a digimarc subscriber? You would be better off asking them, if so.

  • How to extract a set of XML elements from an XML element

    My XML, stored in a variable called v_XML_input, is as follows:
    <Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>I want to extract only whatever is between <Value> and </Value>. In this case just this:
                    <DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>The actual values between the <Value> and </Value> may not always be these same elements; they may be strings, numerical values, or other XML values.
    I've tried the following in a LOOP, and it works for other strings and numerical values, but I get a ORA-30625: method dispatch on NULL SELF argument is disallowed when trying to extract an XML value as a string.
    v_sql_str := v_XML_input .extract('//Parameters/Parameter[position() = '||i||']/Value/text()') .getstringVal()||'''';Any help is appreciated...TIA!

    Not sure what you are actually trying to accomplish.
    What's wrong with
    SQL> SELECT xmlserialize(content XMLTYPE
              ('<Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>'
              ).extract('//Value/*') indent)xml
      FROM DUAL
    XML                                                                                                                                                                                                                                                                                                        
    <DocumentElement>                                                                                                                                                                                                                                                                                          
      <tblAdjustments>                                                                                                                                                                                                                                                                                         
        <EmpID>41439</EmpID>                                                                                                                                                                                                                                                                                   
        <UserNTID>APPUSER</UserNTID>                                                                                                                                                                                                                                                                           
        <Comment>TEST RECORD</Comment>                                                                                                                                                                                                                                                                         
        <Amount>2000</Amount>                                                                                                                                                                                                                                                                                  
        <RecordType>R</RecordType>                                                                                                                                                                                                                                                                             
      </tblAdjustments>                                                                                                                                                                                                                                                                                        
    </DocumentElement> ?
    Note: xmlserialize is not necessary and is there just for pretty printing the result.

  • How to search for particular string in array?

    I am struggling to figure out how to search array contents for a string and then delete the entry from the array if it is found.
    The code for a program that allows the user to enter up to 20 inventory items (tools) is posted below; I apologize in advance for it as I am also not having much success grasping the concept of OOP and I am certain it is does not conform although it all compiles.
    Anyway, if you can provide some assistance as to how to go about searching the array I would be most grateful. Many thanks in advance..
    // ==========================================================
    // Tool class
    // Reads user input from keyboard and writes to text file a list of entered
    // inventory items (tools)
    // ==========================================================
    import java.io.*;
    import java.text.DecimalFormat;
    public class Tool
    private String name;
    private double totalCost;
    int units;
      // int record;
       double price;
    // Constructor for Tool
    public Tool(String toolName, int unitQty, double costPrice)
          name  = toolName;
          units = unitQty;
          price = costPrice;
       public static void main( String args[] ) throws Exception
          String file = "test.txt";
          String input;
          String item;
          String addItem;
          int choice = 0;
          int recordNum = 1;
          int qty;
          double price;
          boolean valid;
          String toolName = "";
          String itemQty = "";
          String itemCost = "";
          DecimalFormat fmt = new DecimalFormat("##0.00");
          // Display menu options
          System.out.println();
          System.out.println(" 1. ENTER item(s) into inventory");
          System.out.println(" 2. DELETE item(s) from inventory");
          System.out.println(" 3. DISPLAY item(s) in inventory");
          System.out.println();
          System.out.println(" 9. QUIT program");
          System.out.println();
          System.out.println("==================================================");
          System.out.println();
          // Declare and initialize keyboard input stream
          BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
          do
             valid = false;
             try
                System.out.print(" Enter an option > ");
                input = stdin.readLine();
                choice = Integer.parseInt(input);
                System.out.println();
                valid = true;
             catch(NumberFormatException exception)
                System.out.println();
                System.out.println(" Only numbers accepted. Try again.");
          while (!valid);
          while (choice != 1 && choice != 2 && choice != 9)
                System.out.println(" Not a valid option. Try again.");
                System.out.print(" Enter an option > ");
                input = stdin.readLine();
                choice = Integer.parseInt(input);
                System.out.println();
          if (choice == 1)
             // Declare and initialize input file
             FileWriter fileName = new FileWriter(file);
             BufferedWriter bufferedWriter = new BufferedWriter(fileName);
             PrintWriter dataFile = new PrintWriter(bufferedWriter);
             do
                addItem="Y";
                   System.out.print(" Enter item #" + recordNum + " name > ");
                   toolName = stdin.readLine();
                   if (toolName.length() > 15)
                      toolName = toolName.substring(0,15); // Convert to uppercase
                   toolName = toolName.toUpperCase();
                   dataFile.print (toolName + "\t");
                   do
                      valid = false;
                      try
                         // Prompt for item quantity
                         System.out.print(" Enter item #" + recordNum + " quantity > ");
                         itemQty = stdin.readLine();
                         // Parse integer as string
                         qty = Integer.parseInt (itemQty);
                         // Write item quantity to data file
                         dataFile.print(itemQty + "\t");
                         valid=true;
                      catch(NumberFormatException exception)
                         // Throw error for all non-integer input
                         System.out.println();
                         System.out.println(" Only whole numbers please. Try again.");
                   while (!valid);
                   do
                      valid = false;
                      try
                         // Prompt for item cost
                         System.out.print(" Enter item #" + recordNum + " cost (A$) > ");
                         itemCost = stdin.readLine();
                         // Parse float as string
                         price = Double.parseDouble(itemCost);
                         // Write item cost to data file
                         dataFile.println(fmt.format(price));
                         valid = true;
                      catch(NumberFormatException exception)
                         // Throw error for all non-number input (integers
                      // allowed)
                         System.out.println();
                         System.out.println(" Only numbers please. Try again.");
                   while (!valid);
                   // Prompt to add another item
                   System.out.println();
                   System.out.print(" Add another item? Y/N > ");
                   addItem = stdin.readLine();
                   while ((!addItem.equalsIgnoreCase("Y")) && (!addItem.equalsIgnoreCase("N")))
                      // Prompt for valid input if not Y or N
                      System.out.println();
                      System.out.println(" Not a valid option. Try again.");
                      System.out.print(" Add another item? Y/N > ");
                      addItem = stdin.readLine();
                      System.out.println();
                   // Increment record number by 1
                   recordNum++;
                   if (addItem.equalsIgnoreCase("N"))
                      System.out.println();
                      System.out.println(" The output file \"" + file + "\" has been saved.");
                      System.out.println();
                      System.out.println(" Quitting program.");
            while (addItem.equalsIgnoreCase("Y"));
    // Close input file
    dataFile.close();
       if (choice == 2)
       try {
          Read user input (array search string)
          Search array
          If match found, remove entry from array
          Confirm "deletion" and display new array contents
       catch block {
    } // class
    // ==========================================================
    // ListToolDetails class
    // Reads a text file into an array and displays contents as an inventory list
    // ==========================================================
    import java.io.*;
    import java.util.StringTokenizer;
    import java.text.DecimalFormat;
    public class ListToolDetails {
       // Declare variable
       private Tool[] toolArray; // Reference to an array of objects of type Tool
       private int toolCount;
       public static void main(String args[]) throws Exception {
          String line, name, file = "test.txt";
          int units, count = 0, record = 1;
          double price, total = 0;
          DecimalFormat fmt = new DecimalFormat("##0.00");
          final int MAX = 20;
          Tool[] items = new Tool[MAX];
          System.out.println("Inventory List");
          System.out.println();
          System.out.println("REC.#" + "\t" + "ITEM" + "\t" + "QTY" + "\t"
                + "PRICE" + "\t" + "TOTAL");
          System.out.println("\t" + "\t" + "\t" + "\t" + "PRICE");
          System.out.println();
          try {
             // Read a tab-delimited text file of inventory items
             FileReader fr = new FileReader(file);
             BufferedReader inFile = new BufferedReader(fr);
             StringTokenizer tokenizer;
             while ((line = inFile.readLine()) != null) {
                tokenizer = new StringTokenizer(line, "\t");
                name = tokenizer.nextToken();
                try {
                   units = Integer.parseInt(tokenizer.nextToken());
                   price = Double.parseDouble(tokenizer.nextToken());
                   items[count++] = new Tool(name, units, price);
                   total = units * price;
                } catch (NumberFormatException exception) {
                   System.out.println("Error in input. Line ignored:");
                   System.out.println(line);
                System.out.print(" " + count + "\t");
                System.out.print(line + "\t");
                System.out.print(fmt.format(total));
                System.out.println();
             inFile.close();
          } catch (FileNotFoundException exception) {
             System.out.println("The file " + file + " was not found.");
          } catch (IOException exception) {
             System.out.println(exception);
          System.out.println();
       //  Unfinished functionality for displaying "error" message if user tries to
       //  add more than 20 tools to inventory
       public void addTool(Tool maxtools) {
          if (toolCount < toolArray.length) {
             toolArray[toolCount] = maxtools;
             toolCount += 1;
          } else {
             System.out.print("Inventory is full. Cannot add new tools.");
       // This should search inventory by string and remove/overwrite matching
       // entry with null
       public Tool getTool(int index) {
          if (index < toolCount) {
             return toolArray[index];
          } else {
             System.out
                   .println("That tool does not exist at this index location.");
             return null;
    }  // classData file contents:
    TOOL 1     1     1.21
    TOOL 2     8     3.85
    TOOL 3     35     6.92

    Ok, so you have an array of Strings. And if the string you are searching for is in the array, you need to remove it from the array.
    Is that right?
    Can you use an ArrayList<String> instead of a String[ ]?
    To find it, you would just do:
    for (String item : myArray){
       if (item.equals(searchString){
          // remove the element. Not trivial for arrays, very easy for ArrayList
    }Heck, with an arraylist you might be able to do the following:
    arrayList.remove(arrayList.indexOf(searchString));[edit]
    the above assumes you are using 1.5
    uses generics and for each loop
    [edit2]
    and kinda won't work it you have to use an array since you will need the array index to be able to remove it. See the previous post for that, then set the value in that array index to null.
    Message was edited by:
    BaltimoreJohn

  • How to do the multiple-line String at JList?

    hey everyone,
    i want to create a JList have to display multiple-line string.
    i have use String a="text1"+"\n"+"text2" inside my JList...
    the "\n" change to a sequare box...
    how cum like that.................??
    i need ur kindly helping...

    Because the default renderer for a JList element is a
    JLabel, and that is how JLabel behaves. The question
    "how to do a multiple-line JLabel" has been asked
    hundreds of times in this forum, search for that.i have search for it already but i no get it..anything!
    so, can u give me the url for me? thank you!

  • Track a Line String with a Trigger

    Hi,
    (sorry for my bad english)
    I need to know if i can track a Line String with a trigger. For example, in my case, i've to colums called "COORDINATEPARTENZA" and "COORDINATEARRIVO". From contains a CONTROID() coordinates, anche TO contains CENTROID() coordinates. Now, can i track a line in a colums "LINE" with a trigger? All in automatic?
    There is a method to take the coordinates from "COORDINATEPARTENZA" and "COORDINATEARRIVO" and track an automatic stringline with a trigger?
    This is the code:
    This is the Trigger:
    CREATE OR REPLACE TRIGGER "TRIGGERPERCORSO"
    BEFORE INSERT OR UPDATE OF luo_nomeluogo ON "SPOSTAMENTI"
    FOR EACH ROW
    DECLARE
    partenza VISUALPERCORSO.coordinatepartenza%TYPE;
    arrivo VISUALPERCORSO.coordinatearrivo%TYPE;
    vecchioluogo LUOGHI.nomeluogo%TYPE;
    nuovocodicespostamento SPOSTAMENTI.codicespostamento%TYPE;
    presenza NUMERIC;
    BEGIN
    SELECT COUNT(*) INTO presenza
    FROM spostamenti
    WHERE ope_codiceopera = :new.ope_codiceopera;
    IF (presenza >= 1) then
    SELECT luo_nomeluogo INTO vecchioluogo
    FROM (SELECT * FROM spostamenti
    WHERE ope_codiceopera = :new.ope_codiceopera
    ORDER BY codicespostamento DESC)
    WHERE ROWNUM <2;
    SELECT SDO_GEOM.SDO_CENTROID (c.COLLOCAZIONE, m.diminfo) INTO partenza
    FROM LUOGHI c, user_sdo_geom_metadata m
    WHERE m.table_name = 'LUOGHI' AND m.column_name = 'COLLOCAZIONE' AND c.nomeluogo = vecchioluogo;
    SELECT SDO_GEOM.SDO_CENTROID (d.COLLOCAZIONE, n.diminfo) INTO arrivo
    FROM LUOGHI d, user_sdo_geom_metadata n
    WHERE n.table_name = 'LUOGHI' AND n.column_name = 'COLLOCAZIONE' AND d.nomeluogo = :new.luo_nomeluogo;
    INSERT INTO VISUALPERCORSO(LUOGOPARTENZA, OPE_CODICEOPERA, COORDINATEPARTENZA, LUOGOARRIVO, COORDINATEARRIVO) VALUES (vecchioluogo, :new.ope_codiceopera, partenza, :new.luo_nomeluogo, arrivo);
    END IF;
    END;
    So, now i need to track a line (with oracle spatial) from "COORDINATEPARTENZA" to "COORDINATE ARRIVO". With another trigger.
    Thanks a lot (sorry for my bad english).

    "COORDINATEPARTENZA" and "COORDINATEARRIVO" are points, correct?
    If I understand, you need to create a line from initial point (PARTENZA) to final point (ARRIVO) in a trigger.
    Yes, you can do it.
    Anyway, you can write to me in italian (miguel dot fornari at gmail).

  • Create point geometry off Line string

    Hi,
    I am new in using the oracle spatial functions. I need some help in trying to generate point geomteries off a line string.
    E.g. I have a line string say is a mile long; I need to dynseg this line string at regular intervals say 1/100th of a mile (52 feet accuracy) and extract the point geometries.
    Basically for a mile long line string, I need 10 point geomteries at equal distances (.01 mile apart). How can I achieve this? Do we have any geomtery functions that does this dyn seg?
    Any help is appreciated.
    This is an e.g of a line string in my table.
    Route: SFRAIR00270**C
    Begin_log:     15.21
    End-log:     15.42
    SD_GEOM: 2002, 41104, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(NUMBER(1, 2, 1)), MDSYS.SDO_ORDINATE_ARRAY(NUMBER(545906.05083, 229998.885452, 545888.2, 230082.23, 545838.54, 230335.43))
    Thanks,
    LS.
    Edited by: user12035460 on Nov 9, 2012 12:35 PM

    If you are licensed for Spatial then look at the SDO_LRS package. It has all the functionality you need.
    If you are not so licensed, have a look at the LINEAR package on my website.
    http://www.spatialdbadvisor.com/source_code/214/linear-package-sdo_lrs-replacement
    regards
    Simon

  • Extract value for Domain

    Hi
    I have to extract value for Domain Name attribute, Please give me the query to do it.
    Thanks lot in advance
    Murthy
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?Siebel-Property-Set EscapeNames="false"?>
    <SiebelMessage MessageId="1-Y4BH" LineItemCount="" IntObjectName="MH Order Item Integration" MessageType="Integration Object" IntObjectFormat="Siebel Hierarchical">
    <ListOfMhOrderItemIntegration>
    <OrderItem>
    <AccountExecID/>
    <ActionCode>Add</ActionCode>
    <AltRepID>20</AltRepID>
    <AddressRowId>1-4XL4-115</AddressRowId>
    <AttentionTo/>
    <CancelCode/>
    <CancelDate/>
    <City>Houston</City>
    <ContractDate/>
    <Country>USA</Country>
    <CreatedBy>SADMIN</CreatedBy>
    <CreatedDateTime>10/19/2005 09:40:50</CreatedDateTime>
    <CreditCardExpDate/>
    <CreditCardNumber/>
    <CreditCardType/>
    <CustomerNumber>5020047500</CustomerNumber>
    <EditionYear>2006</EditionYear>
    <GrossAmount>590</GrossAmount>
    <HoldBilling/>
    <HoldShipping/>
    <InceptionCode>N</InceptionCode>
    <LastUpdatedDateTime>10/19/2005 12:41:12</LastUpdatedDateTime>
    <LastYearTrackingNumber/>
    <LineAmount>590</LineAmount>
    <LineItemRowID>1-1DWIEK</LineItemRowID>
    <LineItemStatus>New</LineItemStatus>
    <ListingID>3803930</ListingID>
    <MigrationChildCode/>
    <MealeysSubId/>
    <MealeysPwd/>
    <MigrationType/>
    <OrderCanvassDate>10/19/2005 00:00:00</OrderCanvassDate>
    <OrderHeaderId>1-1DWHZU</OrderHeaderId>
    <OrderLastUpdatedBy>UMATTJA</OrderLastUpdatedBy>
    <OrderNumber>835905</OrderNumber>
    <OrderTaker>20</OrderTaker>
    <OrgID>2486393</OrgID>
    <POBox/>
    <PrimaryRepID>35</PrimaryRepID>
    <Producer>SIEBEL</Producer>
    <ProductCode>01807</ProductCode>
    <ProductContent>51</ProductContent>
    <ProductName>LHP Plus</ProductName>
    <PurchaseOrderNumber/>
    <Quantity>1</Quantity>
    <ReferenceNumber/>
    <ReinstatedDate/>
    <ReturnMessage>This URL already used by another organization.</ReturnMessage>
    <Revision>0</Revision>
    <RollupCount/>
    <ServiceAccountName>McEwing, David</ServiceAccountName>
    <ShippingCharges/>
    <SiebelAssetIntegrationId>1-1DWIEK</SiebelAssetIntegrationId>
    <SiebelID>2683171</SiebelID>
    <SiebelIntegrationId>1-1DWIEK</SiebelIntegrationId>
    <SiebelLineNumber>5</SiebelLineNumber>
    <SiebelLineNumber2/>
    <SignedBy/>
    <State>TX</State>
    <StateCode>48</StateCode>
    <StreetAddress1>3200 Southwest Freeway, 2355 Phoenix Tower</StreetAddress1>
    <Suite/>
    <TotalDiscountAmount>0</TotalDiscountAmount>
    <TrackingNumber>1-1DXOFH</TrackingNumber>
    <UnitPrice>590</UnitPrice>
    <ZipCode>77027</ZipCode>
    <TaxableFlg/>
    <SolRept/>
    <ListOfAttribute>
    <Attribute>
    <AttrProductCode>1812</AttrProductCode>
    <TrackingNumber>1-1DXOFS</TrackingNumber>
    <Name>Number of Attorneys</Name>
    <SiebelAttrName>100Number of Attorneys LHP Plus|1812</SiebelAttrName>
    <Value>1</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFV</TrackingNumber>
    <Name>Domain Name</Name>
    <SiebelAttrName>103 Domain Name</SiebelAttrName>
    <Value>davidmcewinglaw.com</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFR</TrackingNumber>
    <Name>Tag Line</Name>
    <SiebelAttrName>200 Tag Line</SiebelAttrName>
    <Value>Intellectual Property, Divisional Applications, Trademark, Patent, Copyright, Internet Law</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFO</TrackingNumber>
    <Name>Template</Name>
    <SiebelAttrName>201Template Selection</SiebelAttrName>
    <Value>None</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFN</TrackingNumber>
    <Name>Registration Type</Name>
    <SiebelAttrName>202Registration Type</SiebelAttrName>
    <Value>NEW</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFW</TrackingNumber>
    <Name>Contact First Name</Name>
    <SiebelAttrName>250Contact First Name</SiebelAttrName>
    <Value>David</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFU</TrackingNumber>
    <Name>Contact Last Name</Name>
    <SiebelAttrName>251Contact Last Name</SiebelAttrName>
    <Value>McEwing</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFM</TrackingNumber>
    <Name>Contact eMail</Name>
    <SiebelAttrName>252Contact eMail</SiebelAttrName>
    <Value>[email protected]</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFQ</TrackingNumber>
    <Name>Contact Fax</Name>
    <SiebelAttrName>2533Contact Fax</SiebelAttrName>
    <Value>713-514-9840</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFP</TrackingNumber>
    <Name>Contact Phone</Name>
    <SiebelAttrName>253Contact Phone</SiebelAttrName>
    <Value>713-514-0137</Value>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFT</TrackingNumber>
    <Name>Site Name</Name>
    <SiebelAttrName>256URL</SiebelAttrName>
    <Value/>
    </Attribute>
    <Attribute>
    <AttrProductCode/>
    <TrackingNumber>1-1DXOFL</TrackingNumber>
    <Name>Future unique heads</Name>
    <SiebelAttrName>Future unique heads</SiebelAttrName>
    <Value/>
    </Attribute>
    </ListOfAttribute>
    </OrderItem>
    </ListOfMhOrderItemIntegration>
    </SiebelMessage>

    Once the problem is clearly stated the answer is simple...
    SQL> set serveroutput on
    SQL> declare
      2     myXML XMLType := xmlType(
      3  '<?xml version="1.0" encoding="ISO-8859-1"?>
      4  <?Siebel-Property-Set EscapeNames="false"?>
      5  <SiebelMessage MessageId="1-Y4BH" LineItemCount="" IntObjectName="MH Order Item Integration" MessageType="Integratio
    Format="Siebel Hierarchical">
      6     <ListOfMhOrderItemIntegration>
      7             <OrderItem>
      8                     <AccountExecID/>
      9                     <ActionCode>Add</ActionCode>
    10                     <AltRepID>20</AltRepID>
    11                     <AddressRowId>1-4XL4-115</AddressRowId>
    12                     <AttentionTo/>
    13                     <CancelCode/>
    14                     <CancelDate/>
    15                     <City>Houston</City>
    16                     <ContractDate/>
    17                     <Country>USA</Country>
    18                     <CreatedBy>SADMIN</CreatedBy>
    19                     <CreatedDateTime>10/19/2005 09:40:50</CreatedDateTime>
    20                     <CreditCardExpDate/>
    21                     <CreditCardNumber/>
    22                     <CreditCardType/>
    23                     <CustomerNumber>5020047500</CustomerNumber>
    24                     <EditionYear>2006</EditionYear>
    25                     <GrossAmount>590</GrossAmount>
    26                     <HoldBilling/>
    27                     <HoldShipping/>
    28                     <InceptionCode>N</InceptionCode>
    29                     <LastUpdatedDateTime>10/19/2005 12:41:12</LastUpdatedDateTime>
    30                     <LastYearTrackingNumber/>
    31                     <LineAmount>590</LineAmount>
    32                     <LineItemRowID>1-1DWIEK</LineItemRowID>
    33                     <LineItemStatus>New</LineItemStatus>
    34                     <ListingID>3803930</ListingID>
    35                     <MigrationChildCode/>
    36                     <MealeysSubId/>
    37                     <MealeysPwd/>
    38                     <MigrationType/>
    39                     <OrderCanvassDate>10/19/2005 00:00:00</OrderCanvassDate>
    40                     <OrderHeaderId>1-1DWHZU</OrderHeaderId>
    41                     <OrderLastUpdatedBy>UMATTJA</OrderLastUpdatedBy>
    42                     <OrderNumber>835905</OrderNumber>
    43                     <OrderTaker>20</OrderTaker>
    44                     <OrgID>2486393</OrgID>
    45                     <POBox/>
    46                     <PrimaryRepID>35</PrimaryRepID>
    47                     <Producer>SIEBEL</Producer>
    48                     <ProductCode>01807</ProductCode>
    49                     <ProductContent>51</ProductContent>
    50                     <ProductName>LHP Plus</ProductName>
    51                     <PurchaseOrderNumber/>
    52                     <Quantity>1</Quantity>
    53                     <ReferenceNumber/>
    54                     <ReinstatedDate/>
    55                     <ReturnMessage>This URL already used by another organization.</ReturnMessage>
    56                     <Revision>0</Revision>
    57                     <RollupCount/>
    58                     <ServiceAccountName>McEwing, David</ServiceAccountName>
    59                     <ShippingCharges/>
    60                     <SiebelAssetIntegrationId>1-1DWIEK</SiebelAssetIntegrationId>
    61                     <SiebelID>2683171</SiebelID>
    62                     <SiebelIntegrationId>1-1DWIEK</SiebelIntegrationId>
    63                     <SiebelLineNumber>5</SiebelLineNumber>
    64                     <SiebelLineNumber2/>
    65                     <SignedBy/>
    66                     <State>TX</State>
    67                     <StateCode>48</StateCode>
    68                     <StreetAddress1>3200 Southwest Freeway, 2355 Phoenix Tower</StreetAddress1>
    69                     <Suite/>
    70                     <TotalDiscountAmount>0</TotalDiscountAmount>
    71                     <TrackingNumber>1-1DXOFH</TrackingNumber>
    72                     <UnitPrice>590</UnitPrice>
    73                     <ZipCode>77027</ZipCode>
    74                     <TaxableFlg/>
    75                     <SolRept/>
    76                     <ListOfAttribute>
    77                             <Attribute>
    78                                     <AttrProductCode>1812</AttrProductCode>
    79                                     <TrackingNumber>1-1DXOFS</TrackingNumber>
    80                                     <Name>Number of Attorneys</Name>
    81                                     <SiebelAttrName>100Number of Attorneys LHP Plus|1812</SiebelAttrName>
    82                                     <Value>1</Value>
    83                             </Attribute>
    84                             <Attribute>
    85                                     <AttrProductCode/>
    86                                     <TrackingNumber>1-1DXOFV</TrackingNumber>
    87                                     <Name>Domain Name</Name>
    88                                     <SiebelAttrName>103 Domain Name</SiebelAttrName>
    89                                     <Value>davidmcewinglaw.com</Value>
    90                             </Attribute>
    91                             <Attribute>
    92                                     <AttrProductCode/>
    93                                     <TrackingNumber>1-1DXOFR</TrackingNumber>
    94                                     <Name>Tag Line</Name>
    95                                     <SiebelAttrName>200 Tag Line</SiebelAttrName>
    96                                     <Value>Intellectual Property, Divisional Applications, Trademark, Patent, Copyrig
    alue>
    97                             </Attribute>
    98                             <Attribute>
    99                                     <AttrProductCode/>
    100                                     <TrackingNumber>1-1DXOFO</TrackingNumber>
    101                                     <Name>Template</Name>
    102                                     <SiebelAttrName>201Template Selection</SiebelAttrName>
    103                                     <Value>None</Value>
    104                             </Attribute>
    105                             <Attribute>
    106                                     <AttrProductCode/>
    107                                     <TrackingNumber>1-1DXOFN</TrackingNumber>
    108                                     <Name>Registration Type</Name>
    109                                     <SiebelAttrName>202Registration Type</SiebelAttrName>
    110                                     <Value>NEW</Value>
    111                             </Attribute>
    112                             <Attribute>
    113                                     <AttrProductCode/>
    114                                     <TrackingNumber>1-1DXOFW</TrackingNumber>
    115                                     <Name>Contact First Name</Name>
    116                                     <SiebelAttrName>250Contact First Name</SiebelAttrName>
    117                                     <Value>David</Value>
    118                             </Attribute>
    119                             <Attribute>
    120                                     <AttrProductCode/>
    121                                     <TrackingNumber>1-1DXOFU</TrackingNumber>
    122                                     <Name>Contact Last Name</Name>
    123                                     <SiebelAttrName>251Contact Last Name</SiebelAttrName>
    124                                     <Value>McEwing</Value>
    125                             </Attribute>
    126                             <Attribute>
    127                                     <AttrProductCode/>
    128                                     <TrackingNumber>1-1DXOFM</TrackingNumber>
    129                                     <Name>Contact eMail</Name>
    130                                     <SiebelAttrName>252Contact eMail</SiebelAttrName>
    131                                     <Value>[email protected]</Value>
    132                             </Attribute>
    133                             <Attribute>
    134                                     <AttrProductCode/>
    135                                     <TrackingNumber>1-1DXOFQ</TrackingNumber>
    136                                     <Name>Contact Fax</Name>
    137                                     <SiebelAttrName>2533Contact Fax</SiebelAttrName>
    138                                     <Value>713-514-9840</Value>
    139                             </Attribute>
    140                             <Attribute>
    141                                     <AttrProductCode/>
    142                                     <TrackingNumber>1-1DXOFP</TrackingNumber>
    143                                     <Name>Contact Phone</Name>
    144                                     <SiebelAttrName>253Contact Phone</SiebelAttrName>
    145                                     <Value>713-514-0137</Value>
    146                             </Attribute>
    147                             <Attribute>
    148                                     <AttrProductCode/>
    149                                     <TrackingNumber>1-1DXOFT</TrackingNumber>
    150                                     <Name>Site Name</Name>
    151                                     <SiebelAttrName>256URL</SiebelAttrName>
    152                                     <Value/>
    153                             </Attribute>
    154                             <Attribute>
    155                                     <AttrProductCode/>
    156                                     <TrackingNumber>1-1DXOFL</TrackingNumber>
    157                                     <Name>Future unique heads</Name>
    158                                     <SiebelAttrName>Future unique heads</SiebelAttrName>
    159                                     <Value/>
    160                             </Attribute>
    161                     </ListOfAttribute>
    162             </OrderItem>
    163     </ListOfMhOrderItemIntegration>
    164  </SiebelMessage>'
    165  );
    166    result varchar2(64);
    167  begin
    168     select extractValue(value(attr),'/Attribute/Value')
    169       into result
    170       from table(xmlsequence(extract(myXML,'/SiebelMessage/ListOfMhOrderItemIntegration/OrderItem/ListOfAttribute/Att
    171      where existsNode(value(attr),'/Attribute[Name="Domain Name"]') = 1;
    172    dbms_output.put_line('Result = ' || result);
    173  end;
    174  /
    Result = davidmcewinglaw.com
    PL/SQL procedure successfully completed.
    SQL>This assumes that there is only one Attribute element with a Name node whose value is "Domain Name". If there was more than one such node you would have to use a cursor and process the results in loop.

  • Multi-line String - Match Regular Expression

    I am trying to figure out the format of a regular expression in order to pull select lines out of a multi-line string and populate those lines as individual elements of a string array while using Match Regular Expression. The overall length of the multi-line string can vary as well as the text contained within the string. The string can contain letters, numbers, and special characters. I have attached an example VI. Within the example VI I only want to return the lines beginning with "Device #" into the array. The number of lines beginning with "Device #" can vary but I want to capture them all.
    Or is there a better function to use instead of Match Regular Expression that will give me the desired outcome?  
    Solved!
    Go to Solution.
    Attachments:
    MultiLine Regular Expression.vi ‏22 KB

    aaronb wrote:
    I am trying to figure out the format of a regular expression in order to pull select lines out of a multi-line string and populate those lines as individual elements of a string array while using Match Regular Expression. The overall length of the multi-line string can vary as well as the text contained within the string. The string can contain letters, numbers, and special characters. I have attached an example VI. Within the example VI I only want to return the lines beginning with "Device #" into the array. The number of lines beginning with "Device #" can vary but I want to capture them all.
    Or is there a better function to use instead of Match Regular Expression that will give me the desired outcome?  
    Match Regular Expression works well for this.
    Ben64

  • Using Convert to handle NULL values for empty Strings ""

    After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
      <converter>
        <converter-id>NullStringConverter</converter-id>
        <converter-for-class>java.lang.String</converter-for-class>
        <converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
      </converter>
    ...I then implemented it as follows:
      public String getAsString(FacesContext context, UIComponent component, Object object)
        System.out.println("Converting to String : "+object);
        if (object == null)
          System.out.println("READING null");
          return "NULL";
        else
          if (((String)object).equals(""))
            System.out.println("READING null (Second Check)");
            return null;       
          else
            return object.toString();
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        System.out.println("Converting to Object: "+value+"-"+value.trim().length());
        if (value.trim().length()==0 || value.equals("NULL"))
          System.out.println("WRITING null");
          return null;
        else
          return value.toUpperCase();
    ...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
    <h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
    How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
    Thanks in advance
    Edited by: j2anywhere.com on Oct 19, 2008 9:06 AM

    I changed my converter as suggested :
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        if (value == null || value.trim().length() == 0)
          if (component instanceof EditableValueHolder)
            System.out.println("SUBMITTED VALUE SET TO NULL");
            ((EditableValueHolder) component).setSubmittedValue(null);
          else
            System.out.println("COMPONENT :"+component.getClass().getName());
          System.out.println("Converting to Object: " + value + "< to " + null);
          return null;
        System.out.println("Converting to Object: " + value + "< to " + value);
        return value;
      }which produces the following output :
    SUBMITTED VALUE SET TO NULL
    Converting to Object: < to null
    Info : The INFO line however comes from my controller object where I print out the set value :
    package com.simple;
    import java.util.ArrayList;
    import java.util.List;
    public class Controller
      private String information;
      /** Creates a new instance of Controller */
      public Controller()
        System.out.println("Createing Controller");
        information = "Constructed";
      public String process()
        System.out.println("Info : "+getInformation());
        return "processed";
      public String reset()
        setInformation("Re-Constructed");
        System.out.println("Info : "+getInformation());
        return "processed";
      public String setNull()
        setInformation(null);
        System.out.println("Info : "+getInformation());
        return "processed";
      public String getInformation()
        return information;
      public void setInformation(String information)
        this.information = information;
    }I also changes my JSP / JSF page a little. Here is the updated version
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
        This file is an entry point for JavaServer Faces application.
    --%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
      </head>
      <body>
        <f:view>
          <h:form>
            <h:inputText id="value" value="#{Controller.information}"/>
            <hr/>
            <h:commandLink action="#{Controller.process}">
              <h:outputText id="clicker" value="Process"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.reset}">
              <h:outputText id="reset" value="Reset"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.setNull}">
              <h:outputText id="setNull" value="Set Null"/>
            </h:commandLink>             
          </h:form>
        </f:view>
      </body>
    </html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
    I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
    any other suggestions what could be causing this.

  • Guidelines required to analyze the extraction process for 2LIS_02_SCL.

    Hi All,
    I have a problem here regarding the extraction process for the DataSource 2LIS_02_SCL. The values posted by date fields like
    Posting Date (0PSTNG_DATE)
    Schedule Line Delivery Date (0SCL_DELDAT)
    Statistics Date  (0STAT_DATE)
    In BW are suspected to be wrong values.
    So I am supposed to check the extraction process for PO Schedule Line (2LIS_02_SCL).
    So how can I proceed with this analysis in BW side as well as in SAP R/3.
    Can anyone please help with the process.
    Thanks in advance.

    Hi,
    In Bw thre is always confusion about following Dates.
    Posting Date (0PSTNG_DATE)
    Schedule Line Delivery Date (0SCL_DELDAT)
    Statistics Date (0STAT_DATE)
    So ask Functional Consultants and Business USers and Identify the corretc Date in ECC and then Change the Mapping In UPdate Rules in BW. i.e. What date USer is wanting and accordingly we nee dtgo change the mapping in UPdate Rules in Time Char Tab in UpdateRules.
    Thanks
    Reddy

  • How to analyze the extraction process for 2LIS_02_SCL both in R/3 & BW.

    Hi All,
    I have a problem here regarding the extraction process for the DataSource 2LIS_02_SCL. The values posted by date fields like
    Posting Date (0PSTNG_DATE)
    Schedule Line Delivery Date (0SCL_DELDAT)
    Statistics Date (0STAT_DATE)
    In BW are suspected to be wrong values.
    So I am supposed to check the extraction process for PO Schedule Line (2LIS_02_SCL).
    So how can I proceed with this analysis in BW side as well as in SAP R/3.
    Can anyone please help with the process.
    Thanks in advance.

    Hi,
    In Bw thre is always confusion about following Dates.
    Posting Date (0PSTNG_DATE)
    Schedule Line Delivery Date (0SCL_DELDAT)
    Statistics Date (0STAT_DATE)
    So ask Functional Consultants and Business USers and Identify the corretc Date in ECC and then Change the Mapping In UPdate Rules in BW. i.e. What date USer is wanting and accordingly we nee dtgo change the mapping in UPdate Rules in Time Char Tab in UpdateRules.
    Thanks
    Reddy

  • Get location/coordinates for a field using JavaScript in Acrobat Professional

    Good day,
    I am looking for a way to get the coordinates of a text field.
    I would like to create a listbox and set the location of the listbox top left to the text fields bottom left coordinates, I have had a look at the scripting guides ... could not turn up anything.
    I know how to create and populate this listbox using the JavaScript code, only problem is, to get the coordinates of the text box.

    Try this:
    1. Move or change the dimensions of the text boxes on the extracted page in the configuration that you want.
    2. When you are satisfied with the new configuration, modify the following JavaScript to use the names of the text boxes that you want to include on the page.
    //find_rect //find coordinates of text boxes whose names are included in the var rct,ary = ["fld_1","fld_2","fld_3","fld_4"]; //...etc.
    for (j = 0; j<ary.length; j++){
    console.println(ary[j]);
    rct = this.getField(ary[j]).rect;
    for (i= 0; i< rct.length; i++) console.println(rct[i]);
    3. Add the modified code to the document level of form. (as a doc level javascript but with no function name or brackets included.
    4. When you run the code, the coordinates for the fields that you have included in the array will be printed in the console window:
    Example:
    fld_1
    21
    777
    296
    717
    fld_2
    30
    769
    65
    729

  • How to do the multiple-line String at JList? help!

    i need some code to multiple-line String at JList.
    i know that it is can be done by html code.
    example:
    <p>line1</p><p>line2</p>
    but if i use that html code...
    i face another problem to my JList..
    it cannot set the font use the ListCellRenderer..
    like:
    public Component getListCellRendererComponent(
    JList list,
    Object value,
    int index,
    boolean isSelected,
    boolean cellHasFocus)
    Color newColor = new Color(230, 230, 230);
    setIcon(((DisplayItem)value).getIcon());
    setText(((DisplayItem)value).getChat());
    setFont(((DisplayItem)value).getFont());
    setBackground(isSelected ? newColor : Color.white);
    setForeground(isSelected ? Color.black : Color.black);
    if (isSelected) {
    setBorder(
    BorderFactory.createLineBorder(
    Color.red, 2));
    } else {
    setBorder(
    BorderFactory.createLineBorder(
    list.getBackground(), 2));
    return this;
    all my JList will be html type...
    i don't want that happen..can be another method to do that multiple-line String in JList??
    i also need to set a icon image between string in the JList. anyone get idea??
    i need ur help!
    thank you.

    I think you should create/override several methods like setText(String), setIcons(Icon[]), paintComponent(Graphics), getMinimumSize(), getPreferredSize(), etc.
    I would like to code like below...:class MultilineLabel extends JLabel {
        private String[] text = null;
        private ImageIcon[] icons = null;
        public void setText( String newText ) {
            // It overrides JLabel.setText( String )
            // Tokenize newText with line-separator
            // and put each text into the 'text' array.
        public void setIcons( Icon[] newIcon ) {
            // It is similar to JLabel.setIcon( Icon ) method,
            // but it receives an array of Icon-s. Set these icons to 'icons' variable.
        public void paintComponent( Graphics g ) {
            // It overrides JComponent.paintComponent( Graphics ) method.
            super.paintComponent( g );
            if ( text != null && icons != null ) {
                int icon_x = 0;
                int text_x = 0;
                int y = 0;
                // draw customized content..
                for ( int i=0; i<text.length; i++ ) {
                    // compute x and y locations
                    // icon_x = ...
                    // text_x = ...
                    // y = ...
                    // and draw it!
                    g.drawString( text[ i ], text_x, y );
                    icon[ i ].paintIcon( this, g, icon_x, y );
        public Dimension getMinimumSize() {
            int width = super.getMinimumSize().width;
            int height = ... // I think you must compute it with 'text' and 'icons'' arrays.
            return new Dimension( width, height );
        public Dimension getPreferredSize() {
            int width = super.getPreferredSize().width;
            int height = ...
            return new Dimension( width, height );
    }I think that code-structure above is the minimum to implement your requirements. (Of course if you want to implement it :)
    Good luck and let me know it works or not. :)

Maybe you are looking for