Reading from XML

Hey everyone,
Im new to the whole JavaXML thing and i'm having a bit of trouble. I found an example that is able to read XML but it doesnt seem to read it if the tags are blank, it throws an exception.
Please if anyone can help me with anything.
Thanks alot
Robert

Ah, now I see what you mean by "the tag values are blank". You mean you have an empty element. (It helps if you use standard terminology rather than terms you made up yourself.) Like this:<name></name>I can't see from that code what textUIDList is, but maybe it's null. Or if it isn't then maybe (Node)textUIDList.item(0)).getNodeValue() is null. That wouldn't surprise me because getNodeValue() returns null for a good many types of Node. Check out the API documentation for org.w3c.dom.Node, it's got a nice chart telling you about that.
Quick terminology lesson:
This is an element: <name>Bozo The Clown</name>. Please don't call it a tag.
It consists of a start tag: <name> plus an end tag: </name> plus some contents which in this case are text: Bozo The Clown.
The name of the element is "name".

Similar Messages

  • Problem reading from xml

    So this is the thing: I have a regular xml file I want to
    read from flash, locally it works as it should, when I upload it
    things go wrong. Nothing seems to happen.
    If I use the safari activity window it shows me the xml file
    is either "forbidden" or "method not allowed". I already changed
    the permissions on all the files, still nada...
    I have no clue as to why is this happening, I'm leaving a
    copy of all the files here
    http://www.aquigorka.com/files.zip,
    but I said locally it works, the problem is online. If any of you
    have any ideas to figure out what's happening I'd appreciatte it.
    Cheers
    Gorka

    Let me clear a few things:
    It works offline as it should:
    A flash movie calls a static method from a class to bring
    data from a database.
    Usually I don't read from xml, I read from php (that is whay
    I need the sendandload method), but to debug I transformed the php
    into xml because I couldn't figure out what was causing the
    problem.
    So far, I think the problem is the sendandload method: if I
    change the method to just load it works fine (offline and online),
    if I turn it back to sendandload it just won't work online (offline
    it works smoothly).
    I know the onLoad action is being triggerred as it should,
    but the xml object is empty (why?), I'll try and see if the
    security settings have something to do with this.
    Any other suggestions will be appreciated.
    Thanks for the help so far, but I haven't found the answer
    yet.
    Cheers
    Gorka

  • Output data type of Read from XML file.vi

    LV 7.1:
    How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?

    ahlers01 wrote:
    LV 7.1:
    How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?
    In reply to my own post:
    I found the answer and described it in another forum

  • Nullpointer exception while multiple users reading from XML DOM object

    We are getting a null pointer exception when we are trying to read from a Static XML DOM object . We are getting the exception in weblogic 7.1 very rarely but started getting the exception in weblogic 9.2 more frequently. When multiple users are trying to access the Static variable we are getting null pointer exception. I think it is a memory related issue. Making the whole method synchronized is resolving the issue. But that is not the right thing to do. Can any one know what might be the issue here?
    I am giving the code and the XML. I have tried to give the latest Xerces parser from the Apache site but got the same exception. Please help me in this regard.
    The XML is also provided below along with the code.
    package com.test;
    import java.beans.BeanInfo;
    import java.beans.Introspector;
    import java.util.ArrayList;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    //import org.apache.xml.serialize.XMLSerializer;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class ObjectPersistanceXMLParser {
         public static volatile Document configXML;
         * @param objectName
         * @param attributeName
         * @return
         * @throws Throwable
         public static ArrayList getData(String objectName,String attributeName) throws Exception
              Node ndDoc = getXMLDoc();
              Node ndRoot = ndDoc.getFirstChild();
              NodeList ndFirstList = ndRoot.getChildNodes();
              BeanInfo bi = Introspector.getBeanInfo(ndFirstList.getClass());
              System.out.println("****** "+bi.getBeanDescriptor().getBeanClass().getName());
              System.out.println("This is the number of child nodes present:"+ndFirstList.getLength()+":::"+ndFirstList.item(0).getNodeValue());
              ArrayList returnResult = null;
              String strReturnResult = null;
              for(int i=0;i<ndFirstList.getLength();i++)
                   if(ndFirstList.item(i).getNodeName().equals("ObjectDBMapping"))
                        NodeList ndObjectList = ndFirstList.item(i).getChildNodes();
                        for(int j=0;j<ndObjectList.getLength();j++)
                             if(ndObjectList.item(j).getNodeName().equals("Object"))
                                  if(ndObjectList.item(j).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(objectName))
                                       NodeList ndFieldList = ndObjectList.item(j).getChildNodes();
                                       for(int k=0;k<ndFieldList.getLength();k++)
                                            if(ndFieldList.item(k).getNodeName().equals("field"))
                                                 if(ndFieldList.item(k).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(attributeName))
                                                      returnResult = new ArrayList();
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_TABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_COLUMN").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("TYPE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PERSIST").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("DEFAULT_VALUE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PRIMARY_KEY").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("VERSIONABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PRECISION").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("FOREIGN_KEY").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PARENT_TABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PARENT_COLUMN").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("LEVEL").getNodeValue());
                                                      //return returnResult;
              if(strReturnResult == null){
                   System.out.println("This is the current state of dom: ");
                   //printDom((Document)ndDoc);
                   if(!attributeName.trim().equalsIgnoreCase("class") &&
                        !attributeName.trim().equalsIgnoreCase("operationFlag")&&
                        !attributeName.trim().equalsIgnoreCase("primaryKeyColumnName")&&
                        !attributeName.trim().equalsIgnoreCase("tableName"))               
                        System.out.println("No DB Mapping found for Object "+objectName+" and attribute "+attributeName);
              return returnResult;
         * @param objectName
         * @param tableName
         * @return
         * @throws Throwable
         public static int getMaxFields(String objectName,String tableName) throws Throwable
              Node ndDoc = getXMLDoc();
              Node ndRoot = ndDoc.getFirstChild();
              NodeList ndFirstList = ndRoot.getChildNodes();
              int returnResult = 0;
              for(int i=0;i<ndFirstList.getLength();i++)
                   if(ndFirstList.item(i).getNodeName().equals("ObjectDBMapping"))
                        NodeList ndObjectList = ndFirstList.item(i).getChildNodes();
                        for(int j=0;j<ndObjectList.getLength();j++)
                             if(ndObjectList.item(j).getNodeName().equals("Object"))
                                  if(ndObjectList.item(j).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(objectName))
                                       NodeList ndFieldList = ndObjectList.item(j).getChildNodes();
                                       for(int k=0;k<ndFieldList.getLength();k++)
                                            if(ndFieldList.item(k).getNodeName().equals("field"))
                                                 if(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_TABLE").getNodeValue().equalsIgnoreCase(tableName) &&
                                                           ndFieldList.item(k).getAttributes().getNamedItem("PERSIST").getNodeValue().equalsIgnoreCase("Y"))
                                                      returnResult++;
              return returnResult;
         /*This method returns a Document Object of the ObjectConfig.xml file. This method is separated
         * out from the calling method to keep an option OPEN in case it is later decided to read XML
         * from memory instead of physical location.*/
         public static Document getXMLDoc() throws Exception
              if(configXML == null)
                   synchronized (ObjectPersistanceXMLParser.class)
                        if(configXML == null)
                             if(System.getProperty("OBJECT-CONFIG-XML") == null){
                                  System.out.println("System Property OBJECT-CONFIG-XML not found");
                             String filePath = System.getProperty("OBJECT-CONFIG-XML");
                             System.out.println("Reading CONFIG Xml from file - "+filePath);
                             DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                             BeanInfo bi = Introspector.getBeanInfo(docBuilderFactory.getClass());
                             System.out.println("****** "+bi.getBeanDescriptor().getBeanClass().getName());
                             try
                        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                        configXML = docBuilder.parse(filePath);
                   }catch(Throwable t)
                        int errorCode = 111;
                        String errorMsg = "Problem in parsing OBJECT-CONFIG-XML file";
                        System.out.println(errorMsg);
              else
                   System.out.println("Config XML Loaded from memory.....new");
    return configXML;
         public static void main(String args[]) throws Throwable
         /*public synchronized static void printDom(Document doc){
              XMLSerializer ser = new XMLSerializer(System.out, null);
              try {
                   ser.serialize(doc);
              } catch (Throwable e) {
                   e.printStackTrace();
              System.out.flush();
    <?xml version="1.0"?><root>
         <ObjectDBMapping>
              <Object NAME="com.los.common.entity.LoanTask">
                   <field NAME="loanTaskId" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="LOAN_TASK_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="N" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskId" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UWM_TASK_MASTER" PARENT_COLUMN="TASK_ID">
                   </field>
                   <field NAME="taskName" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskStatus" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskCreationDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CREATION_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskClosureDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CLOSURE_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskClosedBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CLOSED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="UPDATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="UPDATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="CREATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="CREATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              </Object>
              <Object NAME="com.los.common.entity.LOSUnderwritingRules">
                   <field NAME="undwRunRuleId" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDW_RUN_RULE_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="underwritingRunNo" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDERWRITING_RUN_NO" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="underwritingRunId" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDERWRITING_RUN_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="ruleGroup" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="RULE_GROUP" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="ruleName" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="RULE_NAME" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageCode" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_CODE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageText" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_TEXT" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="passFail" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="PASS_FAIL" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideAuthorityLevel" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_AUTHORITY_LEVEL" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideYN" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_Y_N" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideOn" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_ON" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="CREATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UPDATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdDate" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="CREATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedDate" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UPDATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="processName" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="PROCESS_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideReason" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_REASON" TYPE="VARCHAR2" LENGTH="1000"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageModule" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_MODULE" TYPE="VARCHAR2" LENGTH="30"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              </Object>
              <Object NAME="com.los.common.entity.Applicant">
                   <field NAME="applicantId" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="registrationNumber" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="REGISTRATION_NUMBER" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="cifNumber" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CIF_NUMBER" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                        </field>
              <field NAME="customerStatus" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CUSTOMER_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="customerType" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CUSTOMER_TYPE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="applicantLastName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                        SOURCE_COLUMN="APPLICANT_LAST_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="applicantFirstName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_FIRST_NAME" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="applicantMiddleName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_MIDDLE_NAME" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="applicantNameSuffix" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_NAME_SUFFIX" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="nationality" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="NATIONALITY" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="age" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="AGE" TYPE="NUMBER" LENGTH="5"
                   PRECISION="2" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="dateOfBirth" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="DATE_OF_BIRTH" TYPE="DATE" LENGTH=""
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType1" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE1" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType2" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE2" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber1" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER1" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber2" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER2" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="guarantorIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="GUARANTOR_INDICATOR" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="separateCobDisclosureRequir" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="SEPARATE_COB_DISCLOSURE_REQUIR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="domesticRisk" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="DOMESTIC_RISK" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="crossBorderRisk" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="CROSS_BORDER_RISK" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="title" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="TITLE" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="previousSurname" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="PREVIOUS_SURNAME" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="legalName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="LEGAL_NAME" TYPE="VARCHAR2" LENGTH="200"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="preferredName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="PREFERRED_NAME" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="gender" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="GENDER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="seniorCitizenStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="SENIOR_CITIZEN_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="staffIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="STAFF_INDICATOR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="warVeteranIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="WAR_VETERAN_INDICATOR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="noOfDependants" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="NO_OF_DEPENDANTS" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="maritalStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="MARITAL_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="educationStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="EDUCATION_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="detApplicantId" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UW_APPLICANT_MASTER" PARENT_COLUMN="APPLICANT_ID">
              </field>
              <field NAME="detApplicantDetailId" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_DETAIL_ID" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="usResidentIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="US_RESIDENT_INDICATOR" TYPE="VARCHAR2" LENGTH="1"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="employeeNumber" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="EMPLOYEE_NUMBER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="isdefaulter" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="ISDEFAULTER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              </Object>
              <Object NAME="com.los.common.entity.ApplicantContact">
                   <field NAME="applicantId" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UW_APPLICANT_MASTER" PARENT_COLUMN="APPLICANT_ID">
                   </field>
                   <field NAME="contactId" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="CONTACT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="addressType" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="ADDRESS_TYPE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine1" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_1" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine2" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_2" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine3" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_3" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine4" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_4" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="residingSince" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="RESIDING_SINCE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="residentialStatus" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="RESIDENTIAL_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantEMa

    Could you please provide the stack trace?

  • Trouble with multiline text box reading from xml file

    Hi,
    I have a text area, set to multiline.  For some reason, when my text imported from xml shows up in the box, it starts several lines down into the box.  So for example, my Text box is positioned with the top at the midpoint of my stage, but the text starts about 3/4 down the page, about half way down the text box.  Can someone please tell me why this is happening and what I can do to fix it?
    I noticed that when I put my cursor in the box and move it up and down, the rest of the text 'scrolls' into the frame, but otherwise it's cut off.  please help!
    Thanks,
    Stan

    Could you show your XML?

  • Reading from XML file is too slow

    I am trying to read some values from XML file, it takes about 1 or 2 minutes to finish reading, my xml file has about 4000 xml elements. Does anyone know this is normal or something wrong? How could make it faster?
    Thank you

    fine if it helps others... i hope NI will not be angry *fg*
    thx for your bug-report, i do not test the sub.vi until now.
    exchange the OR with an AND, solves the problem with the endless-loop, but error checking will not work (the loop only stops if no error AND no start-tag is found)
    changing the loop termination condition and putting the NOT from the error condition to the no_starttag_flag do both. correctly stops the loop when error occurs OR no further elements found.
    i attached the new sub.vi for version 7.0 and 7.1, also but some colors in the logo, for your convinience
    catweazle
    Attachments:
    xmlFile_GetElements_(Array).vi ‏76 KB
    xmlFile_GetElements_(Array).vi ‏65 KB

  • Reading from XML File to Oracle

    hello,
    I am facing an issue.
    I have an xml file which i want to read into an Oracle dB.
    for ex
    <user>
    <user1 ident="1" />
    <user2 ident="2" />
    </user>
    I would want to pick those attributes and insert them into the dB. i have been hunting high and low, but not reached anywhere.
    The reason, i am using the xml file is, that the user enters values from 3 forms and those values are stored in the xml file. Now, i want to insert these values in the database.
    Any help/suggestion are welcomed and appreciated.
    Thank You
    Sean

    Hi,
    I have been able to read the xml file and convert them into textboxes. The problem, i am facing is, how to i relate each of those values which are generated in the form of textboxes into values required by the Stored Procedure.
    has anyone come across this problem or is there a better approach.
    please advice
    thank you all

  • Issue with creation of SSIS package - reading from XML

    Good Morning,
    having a slight difficulty here and more than this, am afraid solution is pretty straight forward. I am trying to read an XML-file and save the rows to a CSV file (late ron it should be sent to SQL-database).
    Am having this input XML
    <?xml version="1.0" encoding="utf-16"?>
    <DataSet>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="ROW">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="COLUMN" type="xs:short" minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <NewDataSet>
    <ROW diffgr:id="ROW1" msdata:rowOrder="0">
    <COLUMN>1</COLUMN>
    </ROW>
    <ROW diffgr:id="ROW2" msdata:rowOrder="1">
    <COLUMN>2</COLUMN>
    </ROW>
    </NewDataSet>
    </diffgr:diffgram>
    </DataSet>
    but when running the SSIS-package, I get this
    no errors are shown, but also no rows are written/processed.
    Why is nothing read here?

    by the way, when I split the schema and the XML data, having those 2 files
    data.xml
    <?xml version="1.0" encoding="utf-8"?>
    <NewDataSet>
    <ROW >
    <COLUMN>1</COLUMN>
    </ROW>
    <ROW >
    <COLUMN>2</COLUMN>
    </ROW>
    </NewDataSet>
    schema.xsd
    <?xml version="1.0"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="unbounded" name="ROW">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="COLUMN" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    then result is fine

  • Reading from XML file using DOM parser.

    Hi,
    I have written the following java code to read the XML file and print the values. It reads the XML file. It gets the node NAME and prints it. But it returns null when trying to get the node VALUE. I am unable to figure out why.
    Can anyone please help me with this.
    Thanks and Regards,
    Shweta
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class ReadNodes
    private static XMLDocument mDoc;
    public ReadNodes () {
         try {
    DOMParser lParser = new DOMParser();
    URL lUrl = createURL("mot.xml");
    System.out.println("after creating the URL object ");
    lParser.setErrorStream(System.out);
    lParser.showWarnings(true);
    lParser.parse(lUrl);
    mDoc = lParser.getDocument();
         System.out.println("after creating the URL object "+mDoc);
    lParser.reset();
    } catch (Exception e) {
    e.printStackTrace();
    } // end catch block
    } // End of constructor
    public void read() throws DOMException {
    try {
         NodeList lTrans = this.mDoc.getElementsByTagName("TRANSLATION");
         for(int i=0;i<lTrans.getLength();i++) {
              NodeList lTrans1 = lTrans.item(i).getChildNodes();
              System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getNodeName());
              System.out.println("lTrans1.item(0).getNodeValue : " + lTrans1.item(0).getNodeValue());
              System.out.println("lTrans1.item(1).getNodeName : " + lTrans1.item(1).getNodeName());
              System.out.println("lTrans1.item(1).getNodeValue : " + lTrans1.item(1).getNodeValue());
         } catch (Exception e) {
         System.out.println("Exception "+e);
         e.printStackTrace();
         } catch (Throwable t) {
              System.out.println("Exception "+t);
    public static URL createURL(String pFileName) throws MalformedURLException {
    URL url = null;
    try {
    url = new URL(pFileName);
    } catch (MalformedURLException ex) {
    File f = new File(pFileName);
    String path = f.getAbsolutePath();
    String fs = System.getProperty("file.separator");
    System.out.println(" path of file : "+path +"separator " +fs);
    if (fs.length() == 1) {
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    System.out.println("path is : "+path);
    // Try again, if this throws an exception we just raise it up
    url = new URL(path);
    } // End catch block
    return url;
    } // end method create URL
    public static void main (String args[]) {
         ReadNodes mXML = new ReadNodes();
         mXML.read();
    The XML file that I am using is
    <?xml version = "1.0"?>
    <DOCUMENT>
    <LANGUAGE_TRANS>
    <TRANSLATION>
    <CODE>3</CODE>
    <VALUE>Please select a number</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>5</CODE>
    <VALUE>Patni</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>6</CODE>
    <VALUE>Status Messages</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>7</CODE>
    <VALUE>Progress</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>8</CODE>
    <VALUE>Create Data Files...</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>9</CODE>
    <VALUE>OK</VALUE>
    </TRANSLATION>
    </LANGUAGE_TRANS>
    </DOCUMENT>

    because what you want is not the node value of CODE but the node value of the text nodes into it!
    assuming only one text node into it, try this:
    System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getFirstChild().getNodeValue());

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • Reading from XML file and updating the table ????

    Hi
    I have package which reads the hier.XML file and does Update inserts into the 5 tables
    i have table called MAIN_tbl with the column cur_date.
    The package kicks if this cur_date is one day less than the hier.XML file DT.
    Currently i m manually checking this date's to make sure the Main_tbl cur_date is n sync with
    hier.XML file DT.
    for example :- hier.xml file DT is "20091020" then main_table cur_date should be 10/19/2009
    in order to kicks of the pakage.
    what i m looking to do ??
    compare the hier.xml DT with the main_table cur_date,
    if cur_date is -1(Preivous day) of hier.xml DT then run hier_pkg(Package)
    if not then update main_table cur_date to -1(previous day) of the hier.xml DATE
    Then later write the above logic to update the main_table in a procedure, and
    then call the package from the procedure.
    below are the top few lines of the hier.XML file which is relevant to the one which we are trying to do
    <?xml version = '1.0'?>
    <HIER_POSTING num ="111" HIER_TYP="CD" DT="20091020" Global="Y">
    FYI : The hier.XML file is located in UNIX space.
    How do i accomplish this. any idea ????
    Thank you so much in advance. For giving a thought on this problem!!!

    Any thought on this guys ???
    Thanks!!

  • Problem reading ' from XML uisng SAX Parser

    Hi All,
    I have a XML which contains the following element
    <DataText>This is simple ' Text</DataText>I have included & apos ; in the element called DataText.
    When parsing the element, am getting only the text that appears before & apos ;
    When Not including & apos ; am able to get the full text from this element.
    I observed that in the method characters(char buf[], int offset, int len)
    Thelen attribute shows the total length from start position to the position where & apos ; starts...
    How can i get the whole text which includes even " & apos ; "
    Thanks
    Note : while posting this request, & apos; is being formatted to ' . thats the reason included space between them

    HI,
    Was not doing much in the characters method, anyway here is the code
    public void characters(char buf[], int offset, int len) throws SAXException{
        elementText  = new String(buf, offset, len).trim();
    }The value for len is from the start position of the element value and the start position of the ' & apos; ' in the XML File...
    If i remove the ' & apos; ' in the element value , then the len is the full character length in between the element.
    Very confused why this is happening !!
    Did anyone face this problem ever before ?

  • Read From XML

    Hi, i need to read xml from flash builder 4.6
    and this is a xml
    <?xml version="1.0" encoding="utf-8"?>
    <content>
    <contentslides>
    <ServiceContentSlides>
    <ServiceContentSlide slideid ="slide_Ser_Ast_002.swf" thumbid="thumb_Ser_Ast_002.jpg"/>
    <relateditem_refs string1="ref_Ser_Ast_011.pdf" string2="ref_Ser_Ast_013.pdf" string3="ref_Ser_Ast_013.pdf"/>
    <relateditem_plus string1="plus_Ser_Ast_001.pdf" string2="plus_Ser_Ast_002.pdf" string3="plus_Ser_Ast_002.pdf"/>
    </ServiceContentSlides>
    </contentslides>
    <refs>
    <ServiceReferences id ="ref_Ser_Ast_011.pdf" description="1. Prieto L, Badiola C, Villa JR, Plaza V, Molina J, Cimas E. Asthma Control: Do Patients’ and Physicians’ Opinions Fit in with Patients’ Asthma Control Status? J Asthma 2007; 44: 461-467."/>
    </refs>
    <plus>
    <Serviceplus id="plus_Ser_Ast_001.pdf" type="type" title="title"/>
    </plus>
    <Sections>
    <ServiceSection>
    <ServiceSection sectiontitle= "home" sectionID = "item4" sectionslideid="slide_Ser_Ast_001.swf"/>
    <sectionslideList>
    <sectionslideList slideid ="slide_Ser_Ast_001.swf" index ="0"/>
    </sectionslideList>
    </ServiceSection>
    </Sections>
    </content>
    thanks

    Your getStringValue(Node) method only returns the first text node that's a child of the parameter node. If there are more (as in your example) then they are lost. Not to mention that it won't work correctly if the first child of the node is not a text node.
    But fixing that method to concatenate all child text nodes isn't going to work either, as then the output won't be in the correct sequence. You need a depth-first traversal of the tree that appends text nodes as they are encountered.

  • How to read from xml documents using either sax or dom

    dear all
    i have an xml document and i want to create a procedure to read the data from it .
    is it possible or not? thanks in advance

    Where is the xml document located?
    load it into an XMLTYPE and apply xpath as required.
    SQL> declare
      2    xml xmltype ;
      3  begin
      4    xml := xmltype('<node><value>this is text</value></node>') ;
      5    dbms_output.put_line('value='||xml.extract('/node/value/text()').getStringVal()) ;
      6  end ;
      7  /
    value=this is text
    PL/SQL procedure successfully completed.
    SQL>

  • Reading from XML and printing on console

    I have an XML file like this
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ROOT SYSTEM "matches.dtd">
    <ROOT>
    <row>
    <field name="MatchNo">1</field>
    <field name="Date">2006-06-09</field>
    <field name="Time">18:00:00</field>
    <field name="Team1">Germany</field>
    <Team1_sc/>
    <field name="Team2">Costa Rica</field>
    <Team2_sc/>
    <field name="Venue">Munich</field>
    </row>
    <row>
    <field name="MatchNo">2</field>
    <field name="Date">2006-06-09</field>
    <field name="Time">21:00:00</field>
    <field name="Team1">Poland</field>
    <Team1_sc/>
    <field name="Team2">Ecuador</field>
    <Team2_sc/>
    <field name="Venue">Gelsenkirchen</field>
    </row>
    </ROOT>
    I have to print the Data on console
    I wrote a code for this
    import java.io.File;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import java.util.*;
    import java.text.*;
    * Created on Mar 5, 2006
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    * @author Sandeep_Kongathi
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class XMLToConsole {
         String MatchNo = "";
         String Date = "";
         String Time = "";
         String Team1 = "";
         String Team2 = "";
         String Venue = "";
         int totalActionObject=0;
         try {
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    //     System.out.println ("bbbbb");
         Document doc = docBuilder.parse (new File("C:\\matches.xml"));
    //      normalize text representation
         doc.getDocumentElement ().normalize ();
         /* For each child one  */
         NodeList MatchNo = doc.getElementsByTagName("MatchNo");
         Element MatchNoElement = (Element)MatchNo.item(0);
         NodeList textMatchNo = MatchNoElement.getChildNodes();
         MatchNo = ((Node)textMatchNo.item(0)).getNodeValue().trim();
         /* For each child one  */
         /* For each child one  */
         NodeList Date = doc.getElementsByTagName("Date");
         Element DateElement = (Element)Date.item(0);
         NodeList textDate = DateElement.getChildNodes();
         Date =  ((Node)textDate.item(0)).getNodeValue().trim();
         /* For each child one  */
         /* For each child one  */
         NodeList Time = doc.getElementsByTagName("Time");
         Element TimeElement = (Element)Time.item(0);
         NodeList textTime = TimeElement.getChildNodes();
         Time =((Node)textTime.item(0)).getNodeValue().trim();
         /* For each child one  */
         /* For each child one  */
         NodeList Team1 = doc.getElementsByTagName("Team1");
         Element Team1Element = (Element)Team1.item(0);
         NodeList textTeam1 = Team1Element.getChildNodes();
         Team1 = ((Node)textTeam1.item(0)).getNodeValue().trim();
         /* For each child one  */
         /* For each child one  */
         NodeList Team2 = doc.getElementsByTagName("Team2");
         Element Team2Element = (Element)Team2.item(0);
         NodeList textTeam2 = Team2Element.getChildNodes();
         Team2 = ((Node)textTeam2.item(0)).getNodeValue().trim();
         /* For each child one  */
         /* For each child one  */
         NodeList Venue = doc.getElementsByTagName("Venue");
         Element VenueElement = (Element)Venue.item(0);
         NodeList textVenue = VenueElement.getChildNodes();
         Venue = ((Node)textVenue.item(0)).getNodeValue().trim();
         /* For each child one  */
         NodeList listOfActionObject = doc.getElementsByTagName("row");
          totalActionObject= listOfActionObject.getLength();
          for(int s=0; s<listOfActionObject.getLength() ; s++){
          Node firstActionObjectNode = listOfActionObject.item(s);
                if(firstActionObjectNode.getNodeType() == Node.ELEMENT_NODE){
                    NodeList matchList = firstActionObjectElement.getElementsByTagName("MatchNo");
                    Element  matchElement = (Element)matchList.item(0);
                    NodeList textMatchList = matchElement.getChildNodes();
                   MatchNo =((Node)textMatchList.item(0)).getNodeValue().trim();
                    NodeList dateList = firstActionObjectElement.getElementsByTagName("Date");
                    Element dateElement = (Element)dateList.item(0);
                    NodeList textDateList = dateElement.getChildNodes();
                  Date =((Node)textDateList.item(0)).getNodeValue().trim();
                    NodeList timeList = firstActionObjectElement.getElementsByTagName("Time");
                    Element timeElement = (Element)timeList.item(0);
                    NodeList textTimeList = timeElement.getChildNodes();
                    Time =((Node)textTimeList.item(0)).getNodeValue().trim();
                    NodeList team_1List = firstActionObjectElement.getElementsByTagName("Team_1");
                    Element team_1Element = (Element)team_1List.item(0);
                    NodeList textTeam_1List = team_1Element.getChildNodes();
                    Team1 =((Node)textTeam_1List.item(0)).getNodeValue().trim();
                    NodeList team_2List = firstActionObjectElement.getElementsByTagName("Team_2");
                    Element team_2Element = (Element)team_2List.item(0);
                    NodeList textTeam_2List = team_2Element.getChildNodes();
                    Team_2 =((Node)textTeam_2List.item(0)).getNodeValue().trim();
                    NodeList venueList = firstActionObjectElement.getElementsByTagName("Venue");
                    Element venueElement = (Element)venueList.item(0);
                    NodeList textVenueList = venueElement.getChildNodes();
                    Venue=((Node)textVenueList.item(0)).getNodeValue().trim();
                    System.out.println("Match Number: " +MatchNo);
                    System.out.println("Date1:" +Date);
                    System.out.println("Time1: " +Time);
                    System.out.println("Team_1: " +Team1);
                    System.out.println("Team_2: " +Team2);
                    System.out.println("Venue: " +Venue);
                     catch (SAXParseException err) {
                         System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
                         System.out.println(" " + err.getMessage ());
                         }catch (SAXException e) {
                         Exception x = e.getException ();
                         ((x == null) ? e : x).printStackTrace ();
                         }catch (Throwable t) {
                         t.printStackTrace ();
                         System.exit (0);
              I am getting Complie time errors like
    C:\Startup\XMLToConsole.java:53: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         MatchNo = ((Node)textMatchNo.item(0)).getNodeValue().trim();
    ^
    C:\Startup\XMLToConsole.java:60: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         Date = ((Node)textDate.item(0)).getNodeValue().trim();
    ^
    C:\Startup\XMLToConsole.java:67: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         Time =((Node)textTime.item(0)).getNodeValue().trim();
    ^
    C:\Startup\XMLToConsole.java:74: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         Team1 = ((Node)textTeam1.item(0)).getNodeValue().trim();
    ^
    C:\Startup\XMLToConsole.java:81: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         Team2 = ((Node)textTeam2.item(0)).getNodeValue().trim();
    ^
    C:\Startup\XMLToConsole.java:88: incompatible types
    found : java.lang.String
    required: org.w3c.dom.NodeList
         Venue = ((Node)textVenue.item(0)).getNodeValue().trim();
    ^
    6 errors
    Tool completed with exit code 1
    can any one sort out what the error is and reply me

    One thing I see is that you do not have nodes with a name of "MatchNo", for example. You have nodes with a node name of "field", some of whichi have an attribute named "name" wiht a value of "MatchNo".
    You might need to use XPath with a string of
    "/row/field[@name='MatchNo']"
    to find what you want..
    I'm not sure what is causing your compiler errors.
    Dave Patterson

Maybe you are looking for

  • Error while building cube using Relational Access Manager - URGENT

    When we try to build the Express Hybrid database using Relational Access Manager, We got the following error in the Windows NT Event log. "[159] XCA Interface - Exception C0000005 occurred in the XTLLISTN:ClientThread() function in the XWCXCA.DLL mod

  • ABAP Server Proxy development for creation of IDOC

    Hi all, I am working on JDBC to ABAP Server Proxy where i need to populate fields and then i need to mapp to the standard IDOC ie, SHIPMENT_CREATEFROMDATA01 which will create shipment idoc this is my requirement.Can anyone provide me the proxy develo

  • How do I change the time and date on a specific photo

    I import photos from various cameras in the family.  Not everyone has the date or time correct.  In all older versions of iPhoto I could edit the date and time whenever the info field was available.  In the current version all I can find reference to

  • App-v 5.0 Sequence package that requires reboot?

    Hi, I'm sequecing a package that requires a reboot. When I do the reboot, I cannot continue packaging (it does not give me the option to continue). Please advise. J. Jan Hoedt

  • Data source error in Tomcat

    I have encountered a puzzle question with Tomcat,I setup a DSN with Microsoft OLE DB Provider for ODBC Drivers,when I start tomcat with C:\Tomcat5.5\bin\tomcat5w.exe,I get a error: [Microsoft][ODBC Driver Manager] Data source name not found and no de