XML Nested Element HELP

HELP.
I am having problems creating this XML schema in CVI.
In particular, the creation of <chassis> and <slot> tags throws an error. 
ie.
<chassis1> does not start the container, </chassis1> starts the container and there is no subsequent closing element (ie </chassis1>)
Could one provide example code to resolve my problem?
TIA.
<?xml version="1.0" ?>
<config1>
    <chassis1>
          <slot1>
               <element3>VALUE</element3>
               <element4>VALUE</element4>
               <element5>VALUE</element5>
          </slot1>
          <slot2>
              <element7>VALUE</element7>
               <element8>VALUE</element8>
              <element9>VALUE</element9>
          </slot2>
      </chassis1>
      <chassis2>
          <slot1>
               <element3>VALUE</element3>
               <element4>VALUE</element4>
               <element5>VALUE</element5>
          </slot1>
          <slot2>
              <element7>VALUE</element7>
               <element8>VALUE</element8>
              <element9>VALUE</element9>
          </slot2>
      </chassis2>
</config1>
Solved!
Go to Solution.

This is the output as viewed in IE:
  <?xml version="1.0" ?>
- <Rack>
- <Chassis>
  <Fan1Present>0</Fan1Present>
  <Fan2Present>1</Fan2Present>
- <Fuse2>
  1
- <Slot0>
  <Board2>0</Board2>
  </Slot0>
- <Slot1>
  <Board2>0</Board2>
  </Slot1>
  </Fuse2>
  </Chassis>
- <Chassis>
  <Fan1Present>0</Fan1Present>
  <Fan2Present>1</Fan2Present>
- <Fuse2>
  1
- <Slot0>
  <Board2>0</Board2>
  </Slot0>
- <Slot1>
  <Board2>0</Board2>
  </Slot1>
  </Fuse2>
  </Chassis>
  </Rack>

Similar Messages

  • General query to recurse through XML nested elements

    Hi all,
    Using 10g database...and I'm trying to parse XML (stored as clob, no registered schema) that handles nesting and reoccurring of the same element.
    i.e.
    <Policy ID="1">
    <Risk ID="1.1">
    <Risk ID="1.1.1">
    <Risk ID="1.1.1.1">
    </Risk>
    </Risk>
    </Risk>
    <Risk ID="1.2">
    </Risk>
    <Risk ID="1.3">
    <Risk ID="1.3.1">
    </Risk>
    </Risk>
    </Policy>
    The "Risk" element can be nested over and over again (and reoccur). Now, I want to combine each child, grandchild, great grandchild..... "Risk" element to the Policy element.
    i.e resultset has two columns - policyID, riskID
    Next, I'd like to be able to tie each Risk to it's parent Risk
    i.e. resultset has two columns - parentRiskID, childRiskID
    I know how to handle reoccurring and "known" hierarchies by using the XMLTYPE/PASSING techniques in the FROM clause but I'm struggling with the nesting part because I don't how deep it can go....This would seem to be fairly common in XML.
    Any ideas ?
    Thanks,
    Kevin

    Does this help
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext := '<Policy ID="1">
      3  <Risk ID="1.1">
      4  <Risk ID="1.1.1">
      5  <Risk ID="1.1.1.1">
      6  </Risk>
      7  </Risk>
      8  </Risk>
      9  <Risk ID="1.2">
    10  </Risk>
    11  <Risk ID="1.3">
    12  <Risk ID="1.3.1">
    13  </Risk>
    14  </Risk>
    15  </Policy>';
    16  end;
    17  /
    PL/SQL procedure successfully completed.
    SQL> select POLICY_ID, PARENT_RISK_ID, CHILD_RISK_ID
      2    from xmltable
      3         (
      4            '/Policy'
      5            passing xmltype(:xmltext)
      6            columns
      7            POLICY_ID number(4) path '@ID',
      8            RISKS     xmltype   path '//Risk'
      9         ) r,
    10         xmltable
    11         (
    12           '/Risk'
    13           passing RISKS
    14           columns
    15           PARENT_RISK_ID varchar2(40) path '@ID',
    16           CHILD_RISK_ID varchar2(40) path 'Risk/@ID'
    17         )
    18  /
    POLICY_ID PARENT_RISK_ID                           CHILD_RISK_ID
             1 1.1                                      1.1.1
             1 1.1.1                                    1.1.1.1
             1 1.1.1.1
             1 1.2
             1 1.3                                      1.3.1
             1 1.3.1
    6 rows selected.
    SQL> select POLICY_ID, PARENT_RISK_ID, CHILD_RISK_ID
      2    from xmltable
      3         (
      4            '/Policy'
      5            passing xmltype(:xmltext)
      6            columns
      7            POLICY_ID number(4) path '@ID',
      8            RISKS     xmltype   path '//Risk'
      9         ) r,
    10         xmltable
    11         (
    12           '/Risk'
    13           passing RISKS
    14           columns
    15           PARENT_RISK_ID varchar2(40) path '@ID',
    16           CHILD_RISK_ID varchar2(40) path 'Risk/@ID'
    17         )
    18   where CHILD_RISK_ID is not null
    19  /
    POLICY_ID PARENT_RISK_ID                           CHILD_RISK_ID
             1 1.1                                      1.1.1
             1 1.1.1                                    1.1.1.1
             1 1.3                                      1.3.1
    SQL>
    SQL>

  • Cannot transform Java to XML - nested XML elements are empty

    Hi,
    We're using WLI 9.2.1 and in one of our JPDs we're invoking a transformation control that is supposed to do Java -> XML transform. The XQuery for this gets written and works when tested independently within Workshop.
    However, wehn we run the JPD, the transformation is not completely successful. What we find is that attributes values that go into top-level XML elements are populated from the Java object. The nested elements are NOT populated and show up as empty.
    Q: Is this s limitation in WLI 9.2?
    Googling turned up this reference:
    XMLBeans APIs Not Supported for Local Element and Complex Type Variables Produced by XQuery
    http://e-docs.bea.com/wli/docs85/relnotes/relnotesLimit.html#1375310
    http://edocs.bea.com/wli/docs81/relnotes/relnotesLimit.html#1226313
    Q: Is this the problem we are seeing?
    Q: If yes, any ideas if this CR138983 fixed in WLI 9.2? (it is open in 8.1, 8.5).
    Any pointers will be appreciated.
    Thanks.

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • Question about xml schemas and the use of unqualified nested elements

    Hello,
    I have the following schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://xml.netbeans.org/examples/targetNS"
        targetNamespace="http://xml.netbeans.org/examples/targetNS"
        elementFormDefault="unqualified">
        <xsd:element name="name" type="xsd:string"/>
        <xsd:element name="age" type="xsd:int"/>
        <xsd:element name="person">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element ref="name"/>
                    <xsd:element ref="age"/>
                   <xsd:element name="height" type="xsd:int"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>I am just wondering why would someone have a nested element that is unqualified? here the "height" element.
    Can anyone explain this to me please?
    Thanks in advance,
    Julien.
    here is an instance xml document
    <?xml version="1.0" encoding="UTF-8"?>
    <person xmlns='http://xml.netbeans.org/examples/targetNS'
      xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      xsi:schemaLocation='http://xml.netbeans.org/examples/targetNS file:/E:/dev/java/XML/WebApplicationXML/web/newXMLSchemaThree.xsd'>
    <name>toto</name>
    <age>40</age>
    <height>180</height>
    </person>

    Don't worry about it.
    There are two different styles of schemas. In one style, you define the elements, attributes, etc. at the top, and then use the "ref" form to refer to them. (I call this the "global" style.) The other style is to define elements inline where they are used. ("local" style)
    Within some bounds, they work the same and which you use is a choice of you and the tools that generate the schemas.
    A warning about the local style. It is possible to define an element in two different locations in the schema that are different. It will get past all schema validation, but it seems wrong to my sense of esthetics. With the global style, this will not happen.
    So, how did this happen? Probably one person did the schema when it only had a name and age. Then, someone else added the height element. They either used a different tool, or preferred the other style. I'm aware of no difference in the document you have described between the two styles.
    Dave Patterson

  • Specifying nested element with two different XML Schema

    Hello,
    I am trying to convert one xml file to another file. I figure data services would be great for this.
    My problem relates to how to have a source xml file with a certain xml schema be transformed to one of a different xml schema. I cannot build the nested elements of the target schema.
    From the source xml I only need four fields. But they need to be nested three levels in the target xml.
    Source
    <DRUG_PRODUCT_LST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DRUG_ITEM>
          <DRUG_PRODUCT_ID>113083</DRUG_PRODUCT_ID>
          <DIN_PDIN>2317559</DIN_PDIN>
          <HC_BRAND_NAME>PMS-SILDENAFIL</HC_BRAND_NAME>
          <HC_ATC_CODE>G04BE03</HC_ATC_CODE>
       </DRUG_ITEM>
    <DRUG_PRODUCT_LST
    Target
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <CODES>
       <CODE_TYPES>
          <CODE_TYPE>
             <COD_CODE>113083</COD_CODE>
             <COD_DESCR>PMS-SILDENAFIL</COD_DESCR>
             <COD_SOURCE>G04BE03</COD_SOURCE>
             <COD_NPSA>2317559</COD_NPSA>
          </CODE_TYPE>
       </CODE_TYPES>
    </CODES>
    I have tried using an xml pipline to unnest the source, then use a query transform to re-nest for the target. But I do not know how to specify the input schemas.

    Hello,
    I am trying to convert one xml file to another file. I figure data services would be great for this.
    My problem relates to how to have a source xml file with a certain xml schema be transformed to one of a different xml schema. I cannot build the nested elements of the target schema.
    From the source xml I only need four fields. But they need to be nested three levels in the target xml.
    Source
    <DRUG_PRODUCT_LST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DRUG_ITEM>
          <DRUG_PRODUCT_ID>113083</DRUG_PRODUCT_ID>
          <DIN_PDIN>2317559</DIN_PDIN>
          <HC_BRAND_NAME>PMS-SILDENAFIL</HC_BRAND_NAME>
          <HC_ATC_CODE>G04BE03</HC_ATC_CODE>
       </DRUG_ITEM>
    <DRUG_PRODUCT_LST
    Target
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <CODES>
       <CODE_TYPES>
          <CODE_TYPE>
             <COD_CODE>113083</COD_CODE>
             <COD_DESCR>PMS-SILDENAFIL</COD_DESCR>
             <COD_SOURCE>G04BE03</COD_SOURCE>
             <COD_NPSA>2317559</COD_NPSA>
          </CODE_TYPE>
       </CODE_TYPES>
    </CODES>
    I have tried using an xml pipline to unnest the source, then use a query transform to re-nest for the target. But I do not know how to specify the input schemas.

  • Xml-fragment Issue retrieving Nested element data

    Hi,
    I've problem retrieving the nested element data from the xml. Using XmlBeans I am getting null when retriving the inner element. I printed the nested element xmlobject it has Xml-Fragment wrapped. I tired using below code it doesn't throw any error but the data is lost
    AAAA TempObj=AAAA.getBXXX().getCXXX(0);
    //remove xml fragment
    XmlOptions xmlOpt = new XmlOptions();
    xmlOpt.setSaveOuter();
    XmlCursor c= TempObj.newCursor();
    c.toFirstChild();
    Myclass myclassObj= Myclass.Factory.parse(c.getObject().xmlText(xmlOpt));
    log.debug("Records: "+myclassObj .getXXArray().length);
    Output:
    length should give aleast 1 or more but I am getting 0. That means the xmltext didn't parse properly.
    Can anybody suggest what could be the problem.
    Thanks in advance.
    -Sri

    no answer

  • XML self referred nested element error in Data Services

    Hi,
    I am using BO Data services for data transfer. I am having an error while transferring data from xml file to database. Here is the scenario:
    When i execute the job i get the error that an element "CategoryList" found in xml file but not found in the schema used to build the ETL plan.
    i dig into that and found out that "CategoryList" is self referential. For example the CategoryList has a nested element Category, and Category has a nested element CategoryList; which makes CategoryList self referred indirectly. when i don't have this self referential mechanism the data transfer work fine with the same xml and xsd files.
    Is there any special way to deal with this?
    Thanks
    Umer

    Not sure if you have already got the answer, use "URI" not
    "URL".

  • Read any XML File Elements using SAX Parser in J2se

    Hi All
    I can able to parsed one structured XML file using SAX
    Sample code :
    // ===========================================================
         // SAX DocumentHandler methods
         // ===========================================================
         public void startDocument() throws SAXException {
              logger.info("Start of document");
         public void endDocument() throws SAXException {
              logger.info("End of document");
         public void startElement(String namespaceURI, String localName, // local
                   // name
                   String qualName, // qualified name
                   Attributes attrs) throws SAXException {
              elemName = new String(localName); // element name
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_START;
              // Set the string for accumulating the text in a tag to empty
              elemChars = "";
              // If the element name is "row", create a new row instance
              // If the element is "indexxid", "ModelPrice", or "ModelSpread",
              // the value will be read in the method "characters" and stored.
              if (elemName.equals("row")) {
                   row = new IndexRow();
                   numRows++;
              // logger.info("Number of numRow:"+numRows);
         } // end method startElement
         public void endElement(String namespaceURI, String simpleName, // simple
                   // name
                   String qualName // qualified name
         ) throws SAXException {
              elemName = new String(simpleName);
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_END;
              String indexId = new String();
              Double dblVal = new Double(0);
              // If element name is "row", put the current row in the map for row
              // instances
              if (elemName.equals("row")) {
                   if (numRows <= 5) { logger.info("Row is: " + row.toString()); }
                   //ABX
                   //indexRows.put(row.getIndexxId(), row);
                   if (family.equals("ABX.HE")){
                   indexRows.put(row.getIndexREDId(), row);
                   else {
                        //CDX ITRXX
                             indexRows.put(row.getIndexxId(), row);
              } else if (elemName.equals("IndexID")) {
                   row.setIndexxId(elemChars);
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setCompositeSpread(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("REDCode")) {
                   row.setRedCode(elemChars);
              else if (elemName.equals("Name")) {
                   row.setRowName(elemChars);
              } else if (elemName.equals("Series")) {
                   row.setSeries(elemChars);
              } else if (elemName.equals("Version")) {
                   row.setVersion(elemChars);
              } else if (elemName.equals("Term")) {
                   row.setTerm(elemChars);
              } else if (elemName.equals("Maturity")) {
                   row.setMaturity(elemChars);
              } else if (elemName.equals("OnTheRun")) {
                   row.setOnTheRun(elemChars);
              } else if (elemName.equals("Date")) {
                   row.setRowDate(elemChars);
              } else if (elemName.equals("Depth")) {
                   row.setDepth(elemChars);
              else if (elemName.equals("Heat")) {
                   // logger.info("Chars for element " + elemName + " are '" +
                   // elemChars + "'");
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setHeat(dblVal);
                        indexId = row.getIndexxId();
    //          ABX.HE
              else if (elemName.equals("IndexREDId")){
                   row.setIndexREDId(elemChars);
              else if (elemName.equals("Coupon")){
                   row.setCoupon(elemChars);
              if (elemName.equals("Ontherun")) {
                   row.setOnTheRun(elemChars);
         } // end method endElement
         public void characters(char buf[], int offset, int len) throws SAXException {
              // If at end of element, there will be no characters
              if (tagPosition == TAG_END) {
                   return;
              // The characteres method may be called more than once
              // for an element if the internal buffer fills up.
              // Append the characters until the end of the element.
              String strVal = new String(buf, offset, len);
              elemChars = elemChars + strVal;
         } // end method characters
    } // end class MarkItIndexLoader
    but the problem is i want to read (parse) any XML file means any Elemets would be change any time using SAX .In the above example
    else if (elemName.equals("Heat")) {
    else if (elemName.equals("IndexREDId")){
    } else if (elemName.equals("Maturity")) {
    like above I am doing hard code Elements names and reading the values so i don't want hard coding the elements names I want to read any element name and value dynamically.
    If i give any one below XML file i want to read the Elements and displaying to console without changing any code i want to read the XML document.
    EX:
    Student.XML: <root>..</StName>..</StAge>...</root>
    Employee.XML: <root>..</EmpName>..</EmpAge>...</root>
    CdCatalog.XML: <root>..</Cdtitle>...</CdNumber>...</root>
    I need one java program can ready any type of XML file elements and send to the Database table.
    Please any one done like this task please suggest some reference links or books or sample snippet which can help me to develop program in my requirement.
    Thanks in advance
    Regards
    satish

    You should ask in the Java forum.
    Regards
    Stefan

  • Missing images - "XML structure element, not in layout"

    I'm putting together handouts for several classes, which largely consists of copying and pasting text from Microsoft Word into InDesign CS5. Images I am placing manually. After re-organizing some of my files, one of my documents is now missing 118 links to images. However, none of these images are actually in my document - in the Links panel, each image says:
    "XML structure element, not in layout"
    Here's a screenshot of my links panel:
    These images are not supposed to be in the document at all. Clicking "Go To Link" does nothing. Is it possible that copy and pasting text from Word could have also copied the images in the Word document as well, without actually placing them on the pages? They now seem to be stuck in some kind of InDesign limbo.
    The only way I was able to get rid of them was to delete elements from the XML structure panel, however this deletes the content from my pages, which is not exactly helpful. Is there some way to just remove all of the missing image links from my document? Many thanks for any help!

    I was able to solve my problem. After displaying the Structure panel, I apparently had tons and tons of XML elements in the XML structure that were not placed in the document. I've never even seen the Structure panel before so this is totally new to me. I was able to delete all of the XML elements that were not placed in my document by checking their icons.

  • Oracle equivalent of "for xml auto, elements"

    Apologies if this is a bit of a "newbie" question.
    I have a .NET application that makes extensive use of the SQL Server syntax "for xml auto, elements" to retrieve data as an XML stream and then merge this with XSL to produce reports.
    I would like to support both Oracle and SQL Server. Is there a simple way to do this without writing an Oracle specific interface and rewriting all my SQL?

    Hello.
    I am struggling with this, so here are some examples:
    MS SQL Server will allow "for XML auto, elements" or "for XML raw" to be added to the end of a SQL statement to return an XML stream instead of a data set. Taking the MS example Northwind database, the query:
    "select CompanyName, ContactName from Customers where CustomerId like 'A%' for XML raw"
    would return the following stream:
    <row CompanyName="Alfreds Futterkiste" ContactName="Maria Anders"/>
    <row CompanyName="Ana Trujillo Emparedados y helados" ContactName="Ana Trujillo"/>
    <row CompanyName="Antonio Moreno Taquer&#237;a" ContactName="Antonio Moreno"/>
    <row CompanyName="Around the Horn" ContactName="Thomas Hardy"/>
    If you were to change the SQL to be:
    "select CompanyName, ContactName from Customers where CustomerId like 'A%' for XML auto, elements"
    ...you would get back:
    <Customers><CompanyName>Alfreds Futterkiste</CompanyName><ContactName>Maria Anders</ContactName></Customers><Customers><CompanyName>Ana Trujillo Emparedados y helados</CompanyName><ContactName>Ana Trujillo</ContactName></Customers><Customers><CompanyName>Antonio Moreno Taquer&#237;a</CompanyName><ContactName>Antonio Moreno</ContactName></Customers><Customers><CompanyName>Around the Horn</CompanyName><ContactName>Thomas Hardy</ContactName></Customers>
    I have found this useful when merging with XSL to create reports and/or pages on the fly based on queries. I have recently joined OPN and am looking to migrate my applications to Oracle and this is a key factor for me.
    All help gratefully received.

  • No method found for XML query element

    Hi,
    I have an EJB module which contains some entity beans.
    If I try to deploy it or verify it using the Sun One Verifier Tool I get the following exception...
    Error: ** Error trying to process file: java.lang.RuntimeException: No method found for XML query element: Ambiguous or invalid <query-method>
    java.lang.RuntimeException: No method found for XML query element: Ambiguous or invalid <query-method>
    at com.sun.enterprise.deployment.xml.EjbNode.parseQueries(EjbNode.java:700)
    at com.sun.enterprise.deployment.xml.EjbNode.completeLoadingDescriptor(EjbNode.java:671)
    at com.sun.enterprise.deployment.xml.EjbBundleNode.completeLoadingDescriptor(EjbBundleNode.java:524)
    at com.iplanet.ias.deployment.EjbBundleXmlReader.load(EjbBundleXmlReader.java:249)
    at com.iplanet.ias.deployment.EjbBundleXmlReader.loadStdAloneModule(EjbBundleXmlReader.java:162)
    at com.sun.enterprise.tools.verifier.Verifier.openEjbJar(Verifier.java:2421)
    at com.sun.enterprise.tools.verifier.Verifier.loadEjbJar(Verifier.java:1318)
    at com.sun.enterprise.tools.verifier.Verifier.loadJar(Verifier.java:866)
    at com.sun.enterprise.tools.verifier.gui.MainPanel.run(MainPanel.java:187)
    at java.lang.Thread.run(Thread.java:536)
    Look in file "EntityBeans.jar_verified.xml" for detailed results on test assertions.
    This problem can be resolved by un-installing the IDE, removing my user directory, and re-installing the IDE (I am using SunOne Studio 5 SE Update 1). The problem is that it returns with alarming regularity.
    Anyone else experiencing this? Any help would be much appreciated.

    Sometimes, but not always, this exception appears in the ide.log before the error first occurs.
    com.sun.forte4j.j2ee.packaging.PackagingIOException: package/EntityBeans.ejbjar
         at com.sun.forte4j.j2ee.packaging.PackagingUtil.writeJarFile(PackagingUtil.java:403)
         at com.sun.forte4j.j2ee.packaging.PackagingUtil.writeJarFile(PackagingUtil.java:67)
         at com.sun.forte4j.j2ee.ejbmodule.EJBModuleDataObject.writeEJBJar(EJBModuleDataObject.java:2673)
         at com.iplanet.ias.tools.forte.verifier.VerifierAction.performAction(VerifierAction.java:63)
         at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:431)
         at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)

  • Can anyone that works wirth xml in InDesign help me

    I am trying to create a schema to get an Excel workbook into xml so I can take that information and make a member list in inDesign CS6 so I don't have to type it by hand. This is the schema:
    <?xml version="1.0"?>
    <schema xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance">
    <element name="memberList">
        <member>
            <lastname>LastName</lastname>
            <firstname>FirstName</firstname>
            <phone>555-555-5555</phone>
            <streetaddress>streetaddress</streetaddress>
            <city>City</city>
            <state>State</state>
            <zipcode>Zip code</zipcode>
            <email>email</email>           
        </member>
    </element>
    </schema>
    When I bring the schema into Excel, everything seems to be fine except that the top of the tree is wrong in excel. memberList is nott at the top ot the tree. When I pull it over to populate the cells I get no names but when i click on the cell it highlights the proper name in the tree.
    Schema
         element
              name
         member
              lastname
              firstname
              phone
              streetaddress
              city
              state
              zipcode
              email
    Can anyone that works wirth xml in inDesign help me

    I typically get XML from a database, or an Excel sheet without the troublesome XML mapping. Once I simply received an Access database. Access spits out XML in a mostly usable state.
    I use an XML editor that converts the Excel sheet to XML, do any needed transformations, search and replaces, etc in the editor, then save it as an XML I use in ID. The editor is XML Blueprint. I often do other manipulations using UltraEdit as I have long used it for programming and am comfortable with it.
    I did a test in Excel's requisite mapping and found it so cumbersome I didn't successfully get it to export in the 20 minutes it took me to try it. I suspect I could do it with more head scratching but I don't have much hair left.
    But I'll give it another try later today or tonight and see if I can help in the way you want to go about it.
    Take care, Mike

  • How to typecast string to xml DOM element in java

    hai
          i need a string to be converted to xml DOM element in java, can any help me
          i have done in this way
         NodeList children = lParentRule.getElementsByTagName("parentruledetails").item(0).getChildNodes();
    for  
    (int i = 0; i < children.getLength(); i++) {Node nod = children.item(i);
    if  
    (nod.getNodeName().contains("parentcustomdetails")){Element parentcustom = (Element)nod.getNodeName();   // i get typecast error at this line}
    i need to convert the string to element
    can any one help me
    Thanks in Advance

    Hello. You can't cast a string to an element, you need to create that element.
    Maybe this can help up: http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp

  • Extracting nested element text

    Hi everyone,
    I have a basic question which has been on my mind for a few days now. I'd be appreciative for any assistance or advice.
    I'm aiming to extract info using JDOM from all the children of 'Parent' (please see code below). Getting info/text from 'ChildOne' and 'ChildTwo' is easy, but I am having trouble extracting info out of the nested-element at 'ChildThree'.
    I'd be appreciative if anyone can shed light on how to solve such a question: how to not only extract info out of ChildOne, Two but also ChildThree, knowing that ChildThree is nested.
    I've playing around with instantiating an element which gets the children of 'ChildThree' and another which gets the elements of 'ChildThree/'FirstChild'... but I think there's an easier way than that!!
    I've attached a code-snippet which is resembles my XML file. I'd be very appreciative for any advice.
    Thanks,
    p
      <Root>
        <Parent>
          <ChildOne>First</ChildOne>
          <ChildTwo>Second</ChildTwo>
          <ChildThree>
            <InnerChild>
              <First>Text</First>
              <Second>Text</Second>
              <Third>Text</Third>
            </InnerChild>
          </ChildThree>
        </Parent>
      <Root>

    I reached a solution to my problem actually.
    In case other people have the same problem, this is what I did; source-attached.
    I made a behavior called 'displayElements' and it takes a parameter of type Element. I then made it so that for this specific element, I call the '.getChildren()' behavior such that a List is produced. This List was then saved as an Iterator and read-through iteratively.
    At the end, I re-called the 'displayElements' method and passed-in the same element because that element MIGHT have inner-elements.
    Anyways, enough talk. Here's my code incase other people have the same problem.
    public static void displayKids(Element current) {
              //Printing the current-element and the corresponding element-text
              System.out.println(current.getName() + "\t" + current.getTextTrim());
              //Print a row of stars; increases readability
              System.out.println("********************************");
              //For the specific element, we then call 'getters' which get the
              //children for that specific element and save as type 'List'
              List<Element> children = current.getChildren();
              Iterator iterator = children.iterator();
              while (iterator.hasNext()) {
                   Element child = (Element) iterator.next();
                   //Recursively calling the function
                   displayKids(child);
         }

  • Controlling Element Tags using Nested Elements

    When I use the below I get:
    <?xml version = '1.0'?>
    <FSAATLAS>
    <STUDENT>
    <OBJECT_NAME>ADDRESS_T</OBJECT_NAME>
    <INNER_ELEMENT>
    <INNER_ELEMENT_ROW num="1">
    <DUMMY>X</DUMMY>
    </INNER_ELEMENT_ROW>
    </INNER_ELEMENT>
    </STUDENT>
    </FSAATLAS>
    How do I get the INNER_ELEMENT_ROW and num="1" from
    appearing in the NESTED ELEMENT!!!
    Best Regards,
    James Colestock
    import java.sql.*;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.sql.query.*;
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    public class XML {
    public XML() {
    private static final String QUERY = "select object_name, CURSOR(select dummy as dummy from dual) as INNER_ELEMENT from user_objects";
    public static void main(String[] args) throws Throwable {
    Connection c = getConnection();
    OracleXMLQuery q = new OracleXMLQuery(c,QUERY);
    q.setCollIdAttrName("");
    q.setCollIdAttr("");
    q.setRowIdAttrName("");
    q.setRowIdColumn("");
    q.setRowsetTag("FSAATLAS");
    q.setRowTag("STUDENT");
    q.useNullAttributeIndicator(false);
    q.useTypeForCollElemTag(false);
    String s = q.getXMLString();
    System.out.println(s);
    q.close();
    /*q = new OracleXMLQuery(c,QUERY);
    s = q.getXMLMetaData(OracleXMLQuery.SCHEMA,false);
    System.out.println(s);
    q.close();
    q = new OracleXMLQuery(c,QUERY);
    Document d = q.getXMLDOM(OracleXMLQuery.SCHEMA);
    ((XMLDocument)d).print(System.out);
    q.close();
    q = new OracleXMLQuery(c,QUERY);
    s = q.getXMLString(OracleXMLQuery.SCHEMA);
    System.out.println(s);*/
    public static Connection getConnection() throws SQLException {
    String username = " james";
    String password = "masterjames";
    String thinConn = "jdbc:oracle:thin:@localhost:1526:PORTLAND";
    Driver d = new OracleDriver();
    return DriverManager.getConnection(thinConn,username,password);
    }

    When I use the below I get:
    <?xml version = '1.0'?>
    <FSAATLAS>
    <STUDENT>
    <OBJECT_NAME>ADDRESS_T</OBJECT_NAME>
    <INNER_ELEMENT>
    <INNER_ELEMENT_ROW num="1">
    <DUMMY>X</DUMMY>
    </INNER_ELEMENT_ROW>
    </INNER_ELEMENT>
    </STUDENT>
    </FSAATLAS>
    How do I get the INNER_ELEMENT_ROW and num="1" from
    appearing in the NESTED ELEMENT!!!
    Best Regards,
    James Colestock
    import java.sql.*;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.sql.query.*;
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    public class XML {
    public XML() {
    private static final String QUERY = "select object_name, CURSOR(select dummy as dummy from dual) as INNER_ELEMENT from user_objects";
    public static void main(String[] args) throws Throwable {
    Connection c = getConnection();
    OracleXMLQuery q = new OracleXMLQuery(c,QUERY);
    q.setCollIdAttrName("");
    q.setCollIdAttr("");
    q.setRowIdAttrName("");
    q.setRowIdColumn("");
    q.setRowsetTag("FSAATLAS");
    q.setRowTag("STUDENT");
    q.useNullAttributeIndicator(false);
    q.useTypeForCollElemTag(false);
    String s = q.getXMLString();
    System.out.println(s);
    q.close();
    /*q = new OracleXMLQuery(c,QUERY);
    s = q.getXMLMetaData(OracleXMLQuery.SCHEMA,false);
    System.out.println(s);
    q.close();
    q = new OracleXMLQuery(c,QUERY);
    Document d = q.getXMLDOM(OracleXMLQuery.SCHEMA);
    ((XMLDocument)d).print(System.out);
    q.close();
    q = new OracleXMLQuery(c,QUERY);
    s = q.getXMLString(OracleXMLQuery.SCHEMA);
    System.out.println(s);*/
    public static Connection getConnection() throws SQLException {
    String username = " james";
    String password = "masterjames";
    String thinConn = "jdbc:oracle:thin:@localhost:1526:PORTLAND";
    Driver d = new OracleDriver();
    return DriverManager.getConnection(thinConn,username,password);
    }

Maybe you are looking for

  • Creative Cloud for Teams  - lost access

    I'm the account manager for Creative Cloud for Teams, but my account is now showing that I just have a free trial. The other member of my team has full access still but no admin rights. How do I correct?

  • In which tables can I find the sales order item texts?

    Experts, In SD, we have texts on sales order item level. These texts can be filled manually or automatically via access sequences. My question is very simple: in which table can I find these texts? I want to extract them for a big number of sales ord

  • How to create Report BI 7

    Hi All, Could you please explain, how to create reports different ways and different object. Ex:- 1. CKF and RKF        2. Variables ( Characteristic, Formula and Text Variables )        3. Structures and cells        4. Exceptions and Conditions    

  • Syncing photos from the iPhoto library to iPad.

    I'm trying to sync some photos to my ipad 2 using itunes from the iphoto library, but when I tries to sync my photos to my ipad, there's a error message says "unable to sync ipad. Can not find the necessary files" But I have a iPod and it syncs just

  • How RG1 reg update for export sales?

    Hi, Iam doing the Export sales. Iam doing it export under bond. Is it necessary for update RG1 for Export sales? Wt is the process for updating RG1 for export sales? regards, jyothi.