How to insert queue element from C

I want to insert a single queue element into a LabView Queue from C (from a DLL).
The only thing I found is How to set an Labview-Occurence from C. I assume that I have to do that in 2 steps: 1. copy the string data into the queue with a push/pop command. 2. Set the Occurence from the queue to notify waiting queue elements.
I only need to know how to realize this in the exactly way. (internals of Queue handling, Queue structure, example code, ....)
I'm using LabView 6.0.2 with WinNT 4.0
Thank's for help.
Robert

Robert,
You currently cannot access Queue elements from external code. We hope to add this feature to a future version.
Marcus Monroe
National Instruments

Similar Messages

  • How to insert the data from XML to a table

    Hi,
    I'm using Oracle 10g Express Edition
    I need help in How to insert the data from XML file into the table.
    Below is the example i'm working on..
    I have create ridb user with below mentioned privileges:
    Account Status Locked Unlocked
    Default Tablespace: USERS
    Temporary Tablespace: TEMP
    User Privileges :
    Roles:
    CONNECT
    RESOURCE
    Direct Grant System Privileges:
    CREATE DATABASE LINK
    CREATE MATERIALIZED VIEW
    CREATE PROCEDURE
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE SEQUENCE
    CREATE SYNONYM
    CREATE TABLE
    CREATE TRIGGER
    CREATE TYPE
    CREATE VIEW
    & table is created TRIALZIPCODES below mentioned is the DDL:
    CREATE TABLE TRIALZIPCODES
    STATE_ABBR VARCHAR2(20) NOT NULL
    , ZIP_CODE NUMBER(10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2(20)
    Below is the XML FILE: which is stored in C:\OracleProject Folder
    File name: trial.xml
    <?xml version="1.0" ?>
    <metadata>
    - <Zipcodes>
    - <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    - <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    </mappings>
    </Zipcodes>
    </metadata>
    PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
    create or replace
    PROCEDURE TRIAL AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    begin
    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
    insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    DBMS_XMLStore.closeContext(insCtx);
    END;
    END TRIAL;
    For the first time when i complied i got the errors as :
    Procedure RIDB.PROCEDURE1@RIDB
    Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
    Error(16,14): PL/SQL: Item ignored
    Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(29,1): PL/SQL: Statement ignored
    Error(33,1): PL/SQL: Statement ignored
    Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(36,1): PL/SQL: Statement ignored
    Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
    SQL Statement:
    grant execute on utl_file to ridb
    So, it got compiled successfully but when i execute it gives me error as:
    Source does not have a runnable target.
    What does this mean?
    So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
    So can i edit the init.ora with notepad.When i tried to do that it says permission denied
    In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
    but there is also other file initXETemp in the same path do i need to do the changes in it.
    I have tried even editing the SPFILE as mentioned below:
    C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
    So i had reinstall the software again.
    Could you please let me know how to proceed..

    hi,
    I have created the directory from sys database
    CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
    & grant read,write access to the user
    grant read,write on directory XML_DIR2 to RIDB;
    & i had change the tag name in the xml file as shown below:
    <?xml version = '1.0'?>
    <metadata>
    <Zipcodes>
    <mappings Record="4">
    <STABBRE>CA</STABBRE>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    <mappings Record="5">
    <STABBRE>CO</STABBRE>
    <ZIPCODE>80323</ZIPCODE>
    <ZIPCODEEXT>9277</ZIPCODEEXT>
    </mappings>
    </Zipcodes>
    </metadata>
    TRIALZIPCODE table as shown below:
    CREATE TABLE "RIDB"."TRIALZIPCODE"
    (     "STABBRE" VARCHAR2(20 BYTE),
         "ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
         "ZIPCODEEXT" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    I have tried two methods as shown below:
    Procedure 1:
    create or replace
    PROCEDURE TRIAL_V2 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
    DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
    DBMS_XMLStore.setRowTag(insCtx, 'mappings');
    cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
    DBMS_XMLStore.closeContext(insCtx);
    END;
    Procedure 1 was compiled with out errors but when i execute i got the error as :
    Source does not have a runnable target.
    Procedure 2_
    CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
    SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
    extractvalue(x.column_value, 'mappings/ZIPCODE'),
    extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
    FROM TABLE(
    XMLSequence(
    EXTRACT(
    xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
    'metadata/Zipcodes/mappings'
    ) x
    END;
    END TRIAL_V3;
    Procedure 2 was complied without errors but when i execute i got the error as:
    Connecting to the database RIDB.
    ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the file specified.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at "RIDB.TRIAL_V3", line 12
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database RIDB.
    Could you please let me know how to proceed...

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • How to insert a value from sequence in Bussiness Components?

    How to insert a value from sequence in Bussiness Components?
    I would like to do it, but without a triger that would do it before insert.
    I know that there is a type DBSequence in BC where you can insert a sequence name but it does not work when I type there my sequence name.
    Do you now how to fix that problem?
    Bart.

    The newer way to do it is to make the type DBSequence and enter the name of the Sequence object in the sequence field. It must match the same name of the sequence object in the database. Next, you have to create a before insert for each row trigger on the table. Basically, something like this:
    CREATE OR REPLACE TRIGGER TGB_THEME_SEQ
    BEFORE INSERT ON THEME
    FOR EACH ROW
    DECLARE
    BEGIN
    -- Assign the id from the sequence if null
         IF( :new.theme_id IS NULL ) THEN
              SELECT THEME_ID_SEQ.nextval
              INTO :new.theme_id
              FROM dual;
         END IF;
    END;
    In the above example, THEME_ID_SEQ is the seuence object name in the database. If you have the name right but it still fails, then the user you are logging in as probably doesn't have access to the sequence in the database.
    Hope this helps.
    Erik

  • How to reinstall Photoshop Elements from old Pc into Mac?

    How do I reintall Photoshop Elements Windows version into my new Mac.  PC was stolen.

    I looked at it, Barbara, but you can't download 9 without the discs.  I
    originally downloaded it online and Adobe now tells me it only has 10 to
    download.
    On Tue, 19 Jun 2012 07:02:00 -0600 "Barbara B." <[email protected]>
    writes:
    Re: How to reinstall Photoshop Elements from old Pc into Mac?
    created by Barbara B. in Photoshop Elements - View the full discussion
    Did you not look at the link in the thread in my last post, Lorna?
    When you buy software it's your responsibility to keep the media against
    future reinstallations, whether you purchase via download or on disc. If
    you registered your software, for PSE 9 you may still find a download
    link in your adobe store account, if you purchased PSE that way, also.
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page:
    http://forums.adobe.com/message/4504088#4504088
    To unsubscribe from this thread, please visit the message page at
    http://forums.adobe.com/message/4504088#4504088. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements by email or at Adobe Forums
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.

  • WebDynpro Java: how to remove blank element from Table and Dropdown.

    Hi  Folks
    In a webdynpro application,
    I created a table and witten the below code to populate the table
         IPrivateDummyView.IFirst_TableElement First_Table_Element = null;
         First_Table_Element = wdContext.nodeFirst_Table().createFirst_TableElement();
         First_Table_Element.setF_Value("One");
         wdContext.nodeFirst_Table().addElement(First_Table_Element);
         First_Table_Element = wdContext.nodeFirst_Table().createFirst_TableElement();
         First_Table_Element.setF_Value("2");
         wdContext.nodeFirst_Table().addElement(First_Table_Element);
    As per the code, i got 2 row in the table.
    But , i have one Empty row on top of the table ,  how to get ride of this.
    i find the same problem happening with dropdown too, where i used DDBI, i populated a the content as mention, but i initial 2 row as blank and then i have my own elements ,as per my code.

    >
    > how to remove blank element from Table and Dropdown
    >
    Change selection property of related node to from 0..1 to 1..1 (mandatory)
    Re: DropdownByIndex and empty line (Thread: DropdownByIndex and empty line )
    Re: Can the empty selection be removed from element dropdownbykey(Thread: Can the empty selection be removed from element dropdownbykey )
    Edited by: Anagha Jawalekar on Nov 18, 2008 10:28 PM

  • How to insert database elements?

    Hi all,
    could you please tell me .. how to add insert command in our abap program to insert the database elements?  and also we want to know whether we can add the same insert statement we are using on the oracle.we tried with that command but it cause some problem.
    INSERT INTO ZJEYC1 VALUES (' & CUSTNO ' , ' & CUSTNAME & ' , ' & CUSTADDRESS & ' , ' & CUSTMOB & ').
    is it correct?...
    if no please send me the code...

    INSERT - Insert in a database table
    Variants
    1. INSERT INTO dbtab VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa.
    2. INSERT dbtab. or
    INSERT *dbtab. or
    INSERT (dbtabname) ...
    3. INSERT dbtab FROM TABLE itab. or
    INSERT (dbtabname) FROM TABLE itab.
    Effect
    Inserts new lines in a database table .
    You can specify the name of the database table either in the program itself in the form dbtab or at runtime as the contents of the field dbtabname . In both cases, the database table must be defined in the ABAP/4 Dictionary . If the program contains the name of the database table, it must also include a corresponding TABLES statement. Normally, lines are inserted only in the current client. Data can only be inserted using a view if the view refers to a single table and was defined in the ABAP/4 Dictionary with the maintenance status "No restriction".
    INSERT belongs to the Open SQL command set.
    Notes
    You cannot insert a line if a line with the same primary key already exists or if a UNIQUE index already has a line with identical key field values.
    When inserting lines using a view , all fields of the database table that are not in the view are set to their initial value (see TABLES ) - if they were defined with NOT NULL in the ABAP/4 Dictionary . Otherwise they are set to NULL .
    Since the INSERT statement does not perform authorization checks , you must program these yourself.
    Lines specified in the INSERT command are not actually added to the database table until after the next ROLLBACK WORK . Lines added within a transaction remain locked until the transaction has finished. The end of a transaction is either a COMMIT WORK , where all database changes performed within the transaction are made irrevocable, or a ROLLBACK WORK , which cancels all database changes performed within the transaction.
    Variant 1
    INSERT INTO dbtab VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa.
    Addition
    ... CLIENT SPECIFIED
    Effect
    Inserts one line into a database table.
    The line to be inserted is taken from the work area wa and the data read from left to right according to the structure of the table work area dbtab (see TABLES ). Here, the structure of wa is not taken into account. For this reason, the work area wa must be at least as wide (see DATA ) as the table work area dbtab and the alignment of the work area wa must correspond to the alignment of the table work area. Otherwise, a runtime error occurs.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The return code value is set as follows:
    SY-SUBRC = 0 Line was successfully inserted.
    SY_SUBRC = 4 Line could not be inserted since a line with the same key already exists.
    Example
    Insert the customer Robinson in the current client:
        TABLES SCUSTOM.
        SCUSTOM-ID        = '12400177'.
        SCUSTOM-NAME      = 'Robinson'.
        SCUSTOM-POSTCODE  = '69542'.
        SCUSTOM-CITY      = 'Heidelberg'.
        SCUSTOM-CUSTTYPE  = 'P'.
        SCUSTOM-DISCOUNT  = '003'.
        SCUSTOM-TELEPHONE = '06201/44889'.
        INSERT INTO SCUSTOM VALUES SCUSTOM.
    Addition
    ... CLIENT SPECIFIED
    Effect
    Switches off automatic client handling. This allows you to insert data across all clients even when dealing with client-specific tables. The client field is then treated like a normal table field which you can program to accept values in the work area wa that contains the line to be inserted.
    The addition CLIENT SPECIFIED must be specified immediately after the name of the database table.
    Example
    Insert the customer Robinson in client 2:
        TABLES SCUSTOM.
        SCUSTOM-MANDT     = '002'.
        SCUSTOM-ID        = '12400177'.
        SCUSTOM-NAME      = 'Robinson'.
        SCUSTOM-POSTCODE  = '69542'.
        SCUSTOM-CITY      = 'Heidelberg'.
        SCUSTOM-CUSTTYPE  = 'P'.
        SCUSTOM-DISCOUNT  = '003'.
        SCUSTOM-TELEPHONE = '06201/44889'.
        INSERT INTO SCUSTOM CLIENT SPECIFIED VALUES SCUSTOM.
    Variant 2
    INSERT dbtab. or
    INSERT *dbtab. or
    INSERT (dbtabname) ...
    Additions
    1. ... FROM wa
    2. ... CLIENT SPECIFIED
    Effect
    These are the SAP -specific short forms for the statements explained under variant 1.
    INSERT INTO dbtab VALUES dbtab. or
    INSERT INTO dbtab VALUES *dbtab. or
    INSERT INTO (dbtabname) VALUES wa.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The return code value is set as follows:
    SY-SUBRC = 0 Line successfully inserted.
    SY_SUBRC = 4 Line could not be inserted, since a line with the same key already exists.
    Example
    Add a line to a database table:
        TABLES SAIRPORT.
        SAIRPORT-ID   = 'NEW'.
        SAIRPORT-NAME = 'NEWPORT APT'.
        INSERT SAIRPORT.
    Addition 1
    ... FROM wa
    Effect
    The values for the line to be inserted are not taken from the table work area dbtab , but from the explicitly specified work area wa . The work area wa must also satisfy the conditions described in variant 1. As with this variant, the addition allows you to specify the name of the database table directly or indirectly.
    Note
    If a work area is not explicitly specified, the values for the line to be inserted are taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 2
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Variant 3
    INSERT dbtab FROM TABLE itab. or
    INSERT (dbtabname) FROM TABLE itab.
    Additions
    ... CLIENT SPECIFIED
    ... ACCEPTING DUPLICATE KEYS
    Effect
    Mass insert: Inserzts all lines of the internal table itab in a single operation. The lines of itab must satisfy the same conditions as the work area wa in variant 1.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines.
    The return code value is set as follows:
    SY-SUBRC = 0 All lines successfully inserted. Any other result causes a runtime error .
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0 after the call.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Addition 2
    ... ACCEPTING DUPLICATE KEYS
    Effect
    If a line cannot be inserted, the processing does not terminate with a runtime error, but the return code value of SY-SUBRC is merely set to 4. All the remaining lines are inserted when the command is executed.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • How do I extract elements from a file?

    Let's say I have a larger file with several layers and various elements on the layers - like a web page layout.
    On 1 layer the is top logo.
    I am trying to extract just that 1 part and save for web as small jpg or png and put that one pic in my web design app.
    Q: How do I easily exctract / export / save for web (small version) just that one part?

    If you do a lot of saving graphic elements from web page mock-ups, it's worth reading up on using slices.
    Also have a look at layer comps. Combining the two enables you to save all the graphic elements of the web page (including various roll-over states) from one master file.

  • How to insert special character from Oracle form builder 10g

    Dear all,
    I need help. how to insert special character like 'Superscript or Subscript ' from oracle form builder 10g. I had try in Oracle form builder 6i with press ALT+ASCII code in the text item and it work, but in the oracle form builder 10g this method doesn't work... would you like to help me...somebody please...
    Best Regard,
    Dedy P.T.

    What do you mean by insert ... from Forms Builder? Do you mean you want to add it as text in a string of pl/sql code or as part of boiler plate text (label) or a value on the Property Palette?
    For special characters you would need set NLS_LANG to something that would support the characters you want to use. For the Builder to see the change, you would need to set NLS_LANG to something like:
    NLS_LANG=AMERICAN_AMERICA.UTF8
    This can be done in the Windows Registry or system. As I mentioned, this will only apply to the Builder and will have nothing to do with a running form. For running forms you would need to set this in default.env. As for things like super and sub scripts, these are font formats and not necessarily characters. For the most part, I don't believe these are supported in Forms.

  • How to insert cropped images from photoshop without the white background

    Basically all I want to do is take a peice of writing from a video and insert it into another video. To do this I've took a screenshot of the font from the video and imported it into photoshop. I've then cropped/cut/took the the peice of writing I want, letter by letter. I want to be able to insert it into another video, but whenever I attempt to do it, I have the default white background of photoshop. Is there anyway to insert an image from photoshop, without taking the background with it, or even insert a layer from photoshop straight into final cut pro? Sorry if this is confusing.

    I don't think so. I cropped the letters, put them each an individual file, removed the background, saved them as a TIF then tried to import them onto Final Cut Pro, but a white background still appeared in the TIF file. Basically I just want to make the background transparent I believe.

  • How to insert data elements automatically?

    Hi,
    I am developing an ADF (JSF, BC) application with JDev 10. What I've done up to now is an creation form, where you can put in the attributes of an object which are stored to the database by clicking the commit-button.
    This works well. What do I have to do if I want to automically create a primary key which should be added to the same row by clicking the commit-button? In general I would like to know, how to automatically write elements to the database in case of certain events. Is this realized with mananged beans or do I have to alter the class of the entity object. I've searched for this toppic in the Developers Guide but found nothing.
    I don't have much experience with Java, so if this problem could be solved with Java-Code, it would be nice if you could give me a source where I can read how to program this.
    Thank you in advance.

    Use a database sequence to create the unique key and use the DBSequence type for the attribute in your EO that maps to this key.
    Search for DBSequence in the ADF Developer Guide and you'll see it.

  • How get all child elements from XML

    Hi
    I have one xml i tried to parse that xml using dom parser and i need to get some child elements using java
    <Group>
    <NAME>ABC</NAME>
    <Age>24</AgeC>
    ---------some data here......
    <Group1>
    <group1Category>
    <NAME>ABCTest</NAME>
    <age>27</Age>
    ----Some data here
    <group1subcategory>
    <subcategory>
    <NAME>ABCDEF</NAME>
    <age>28</Age>
    my intention was
    get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    my xml contains any number of Group nodes...but only i want name contains ABC
    i wriiten code like this
    DocumentBuilderFactory factory = DocumentBuilderFactory
    .newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(xmlFile);
    NodeList nodeList = document.getElementsByTagName("*");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    what is next step i need to do..please help

    964749 wrote:
    Sorry for inconvenience caused..i only asked if any ideas i not ask any body to spent time for me...
    This is simple code developed using xpath..i not know how i proceed further
    public class Demo {
    public static void main(String[] args) {
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document dDoc = builder.parse("hello.xml");
    XPath xpath = XPathFactory.newInstance().newXPath();
    javax.xml.xpath.XPathExpression expr = xpath.compile("//Group/NAME");
    Object Name= expr.evaluate(dDoc, XPathConstants.STRING);
    System.out.println(Name);
    } catch (Exception e) {
    e.printStackTrace();
    i need get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    ..how i done in XPATH and also do manipulation of remining result...
    i also try with DOM like
    NodeList nodeList = document.getElementsByTagName("GROUP");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    if (element.getNodeName().matches("ECUC-MODULE-DEF"))
    String str=((Element) nodeList.item(i)).getElementsByTagName("NAME").item(0).getFirstChild().getNodeValue();
    if(str.equalsIgnoreCase("abc")){
    NodeList children = element.getChildNodes();
    for (int k = 0; k < children.getLength(); k++) {
    Node child = children.item(k);
    System.out.println("children"+children.getLength());
    if (child.getNodeType() != Node.TEXT_NODE) {
    if(child.getNodeName().equalsIgnoreCase("Group1"))
    how iterate for particular ABC name to group1 and subcategoryFew things
    1. Use code tags to format code
    2. Explain the problem statement clearly. Take time to formulate your question. Explain what you expect from your code and what you are getting along with any exceptions that are being thrown

  • How to insert 10 files from a directory to database,can i use dbms_lob??

    Hii
    I want to load 10files in my local drive into a table...how to do this.I'm able to do this individually using dbms_lob.loadfromfile and bfil but ,I want to copy all the files i that drive at time to my table...Is there any way to do this..?

    Okay... Here is some sample code that will help you store the files in binary format into db tables.
    create table t_blob(bid integer, blbdata blob);
    select * from t_blob;
    create or replace directory ext_tab_dir as 'C:\Oracle\ExtTab_Dir';
    grant read, write on directory ext_tab_dir to priya;
    declare
          src_file bfile;
          dest_file blob;
          len_file pls_integer;
    begin
          src_file:=bfilename('EXT_TAB_DIR','XML.doc');
          insert into t_blob values(1,empty_blob()) returning blbdata into dest_file;
          select blbdata into dest_file
            from t_blob
           where bid=1 for update;
          dbms_lob.fileopen(src_file,dbms_lob.file_readonly);
          len_file:=dbms_lob.getlength(src_file);
          dbms_output.put_line(len_file);
          dbms_lob.loadfromfile(dest_file,src_file,len_file);
          update t_blob
             set blbdata = dest_file
           where bid = 1;
          dbms_lob.fileclose(src_file);
    end;
    /I haven't used the wrap utility yet, so not much hands on with it. I guess the wrap utility at the OS level. Not sure if it will work at SQL prompt.

  • How to remove an Element from XML by confirming Attribute of that element

    Hi guys
    I have an XML file where i have all users DB. Now i want to remove a user from that XML file. I want to check an user id attribute which is uniqe with existing users in XML file, if its the same user then delete this user from XML file and save the changes in XML file.
    here is my XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <users>
    <user id="zahid" password="X8UrUN79avT27LYwUESiliAV328=" name="Zahid Nawaz" phone="9599808" email="[email protected]" role="Tnr+vPuuAAsix8heVWD4mioCgLQ=" />
    <user id="Admin" name="alpha beta" password="fEqNCco3Yq9h5ZUglD3CZJT4lBs=" phone="456782656" email="[email protected]" role="Tnr+vPuuAAsix8heVWD4mioCgLQ=" />
    <user id="Guest" name="beta alpha" password="+ml3yZuAnbaOHFaIjsOL0ARxmzk=" phone="8765432" email="[email protected]" role="+s6D7jAUvcj5ggPMlOLokiJFLpA=" /><user id="Guest1" name="unknown unknown" password="+ml3yZuAnbaOHFaIjsOL0ARxmzk=" phone="123122112" email="[email protected]" role="+s6D7jAUvcj5ggPMlOLokiJFLpA=" />
    </users>for example i want to delete a user which have user id= Guest.
    How can i do it in Java. Any code example please. i am using JDOM document and SAXBuilder for parsing.
    Waiting for your replay.
    Thanks in Advance
    Best regard

    Hi,
    Till now i tried the following code which give null pointer exception at following line
    element.getParentNode().removeChild(element);
         public String removeUserByID(String id) throws Exception{
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                 DocumentBuilder builder = factory.newDocumentBuilder();
                 TransformerFactory tFactory = TransformerFactory.newInstance();
                 Transformer tFormer = tFactory.newTransformer();
                   doc = builder.parse(usersXml);
                 Element element = (Element)doc.getElementsByTagName("user id="+id).item(0);
    //             Remove the node
                 element.getParentNode().removeChild(element);
    //             Normalize the DOM tree to combine all adjacent nodes
                 doc.normalize();
                 FileOutputStream fos = new FileOutputStream(this.usersXml);
                   XMLOutputter out = new XMLOutputter();
                   out.output(((org.jdom.Document)doc), fos);
              /*     Source source = new DOMSource(doc);
                 Result dest = new StreamResult(System.out);
                 tFormer.transform(source, dest);
                 System.out.println();
                 return "true";
              if following line i m trying to use first attribute of my XML file where i am passing a string which is for example like "user id=Guest". id is a string which have user Id "Guest".
    Element element = (Element)doc.getElementsByTagName("user id="+id).item(0);So any suggestion??Whats wrong here?
    Best regards and thanks again 4 ur reply.

  • How to insert unicode charater from SQLPLUS

    Hi all,
    My problem is following :
    I want to store unicode character in a column of table so I create table with command : CREATE TABLE PERSON( ID NUMBER(4) NOT NULL ,NAME NVARCHAR2(64) NOT NULL).
    NLS_CHARACTERSET is set in DB :
    SQL> SELECT * FROM NLS_DATABASE_PARAMETERS;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 8.1.7.0.0
    18 rows selected.
    when I insert data into above table (PERSON) with none unicode character is OK, but I failed with unicode character.
    Can anyone help me to solve this proplem?
    Thank you so much for any hints
    Pls email me at : [email protected]

    NLS_CHARACTERSET WE8ISO8859P1 is a western eurpoean character set (without the Euro symbol and about !# other funky characters being supported - use NLS_CHARACTERSET WE8ISO8859P1% if you want the Euro symbol, sorry just a sidenote). Anyways, this will need to be changed to UTF* before it can store Unicode characters. There are various ways to do this, but the best option is probably to export the entire database, create scripts to recreate all tablespaces and datafiles, drop the database, recreate the database in UTF8, then import the export file. There's a lot of little 'gotchas' involved so be prepared for it not to work the first time. But if it doesn't work, you can always create the database again with NLS_CHARACTERSET WE8ISO8859P1 and reimport so everything is back to how it was.

Maybe you are looking for

  • IMac 2010 11,3 Green/Purple Pixels

    Hi Guys, Been browsing the internet for ages, including the apple forums, and always come across similar issues, but never seem to fit mine 100%. I've got a 27" iMac 2010 11,3 i5. Basically, about a year or so ago, it started to get these slight gree

  • Monitor no longer sleeping after 10.8.2 & Mac Mini EFI update

    Hopefully someone can help out here, my new 2012 Mac Mini was running fine without any problems, then when I installed the 10.8.2 update (not the original update that got pulled from the Apple site but the newer version) with the EFI Mac Mini firmwar

  • Can't open PDF files in safari or firefox. get a black screen

    For some time now I have been unable to view PDF files whether I am using safari or firefox.  If I have the option, I can safe the PDF to my computer and then it will open just fine.  If I'm on a site that has a PDF I want to view, print, etc., it op

  • Undefined constructor and model nodes

    Hi all !! I have one custom controller SolicitudesViaje for which its internal counterpart InternalSolicitudesViaje.java says: "The constructor SolicitudesViaje(IPrivateSolicitudesViaje) is undefined" The code inside the internal class where the prob

  • Deleting a deployment without a Software Update Group

    I deleted a Software Update group prior to removing the deployment attached. I am not unable to remove the deployment nor recreate the deployment with the same name through the Config Manager. Is there a was to remove the deployment package? Thanks.