Node names of siblings in xslt

I have following xslt code
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="*">
          <root>
               <xsl:for-each select="*/*">
                    <xsl:variable name="mainNode" select="name()" />
                    <xsl:if
                         test="starts-with($mainNode,'Add_1') and contains($mainNode,'street1')">
                         <Add>
                              <xsl:value-of select="." />
<!-- I want something that goes in here that allows me to select next node name of "mainNode" and its next node-- i.e. Node names of next two siblings of mainNode -->
                         </Add>
                    </xsl:if>
               </xsl:for-each>
          </root>
     </xsl:template>
</xsl:stylesheet>As mentioned in the code, I want to find node names of next two siblings of mainNode
Any suggestions?
Thanks...

I tried something like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="*">
          <root>
               <xsl:for-each select="*/*">
                    <xsl:variable name="nodeName" select="name()" />
                    <xsl:if
                         test="starts-with($nodeName,'Add_1') and contains($nodeName,'street1')">
                         <Add>
                              <xsl:value-of select="." />
                              <xsl:value-of select="following-sibling::nodeName[1]" />  <!-- This is what I added-->
                         </Add>
                    </xsl:if>
               </xsl:for-each>
          </root>
     </xsl:template>
</xsl:stylesheet>My input XML file is as below:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
     <person>
          <id>1 </id>
          <Add_1_street1>happy street</Add_1_street1>
          <Add_1_street2>A Road</Add_1_street2>
          <Add_1_city>City1</Add_1_city>
     </person>
     <person>
          <id>2</id>
          <Add_1_street1>sad street</Add_1_street1>
          <Add_1_street2>B Road</Add_1_street2>
          <Add_1_city>City2</Add_1_city>
          <Add_2_street1>Bore street</Add_2_street1>
          <Add_2_street2>C Road</Add_2_street2>
          <Add_2_city>City1</Add_2_city>
     </person>
</root>It does not give me any compiler issue but it does not print the value of next sibling. Can't figure out why. Any pointers?
Thanks!

Similar Messages

  • How to transform node name in XML data source for SSIS

    I have the following xml file; I want to change the node name of Emp.location to Emp_location, Edu.location to Edu_location, Addr.location to Addr_location as it was not supported by SSIS. I have multiple files like that. I  am thinking to use SSIS XML
    task with  XLST file to transform it. Can anybody help it?
    Thank you
    <?xml version="1.0" encoding="utf-8"?>
    <Resumes>
    <Resume>
      <Name>
        <Name.Prefix />
        <Name.First>Shai</Name.First>
        <Name.Middle />
        <Name.Last>Bassli</Name.Last>
        <Name.Suffix />
      </Name>
      <Skills>
        I am an experienced and versatile machinist who can operate a range of machinery personally
    as well as supervise the work of other machinists. I specialize in diagnostics and precision inspection, have expertise in reading blueprints, and am able to call on strong interpersonal and communication skills to guide the work of other production machinists
    whose work I am called upon to inspect.
        My degree in mechanical engineering affords me a better theoretical understanding and mathematical
    background than many other candidates in the machinist trade.
      </Skills>
      <Employment>
        <Emp.StartDate>2000-06-01Z</Emp.StartDate>
        <Emp.EndDate>2002-09-30Z</Emp.EndDate>
        <Emp.OrgName>Wingtip Toys</Emp.OrgName>
        <Emp.JobTitle>Lead Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Supervised work of staff of four machinists. Coordinated all complex assembly and tooling
    activities, including production of tricycles and wagons.
          Developed parts fabrication from sample parts, drawings and verbal orders.Worked with
    ISO9000 implementation.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>MI </Loc.State>
            <Loc.City>Saginaw</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Employment>
        <Emp.StartDate>1996-11-15Z</Emp.StartDate>
        <Emp.EndDate>2000-05-01Z</Emp.EndDate>
        <Emp.OrgName>Blue Yonder Airlines</Emp.OrgName>
        <Emp.JobTitle>Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Repaired and maintained a variety of production and fabrication machine tools.
          Set up and operated machines to close tolerances. Used and wrote CNC machine programs.
    Trained extensively in computer-aided manufacturing.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IL </Loc.State>
            <Loc.City>Chicago</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Employment>
        <Emp.StartDate>1994-06-10Z</Emp.StartDate>
        <Emp.EndDate>1996-07-22Z</Emp.EndDate>
        <Emp.OrgName>City Power and Light</Emp.OrgName>
        <Emp.JobTitle>Assistant Machinist</Emp.JobTitle>
        <Emp.Responsibility>
          Performed centerless grinding. Received training in manual mill and lathe machines,
    as well as micrometers and calipers.
          Owned complete toolset.Worked extensive overtime on request.
        </Emp.Responsibility>
        <Emp.FunctionCategory>Production</Emp.FunctionCategory>
        <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
        <Emp.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IA </Loc.State>
            <Loc.City>Des Moines</Loc.City>
          </Location>
        </Emp.Location>
      </Employment>
      <Education>
        <Edu.Level>Bachelor</Edu.Level>
        <Edu.StartDate>1990-09-15Z</Edu.StartDate>
        <Edu.EndDate>1994-05-10Z</Edu.EndDate>
        <Edu.Degree>Bachelor of Science</Edu.Degree>
        <Edu.Major>Mechanical Engineering</Edu.Major>
        <Edu.Minor />
        <Edu.GPA>3.2</Edu.GPA>
        <Edu.GPAScale>4</Edu.GPAScale>
        <Edu.School>Midwest State University</Edu.School>
        <Edu.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>IA </Loc.State>
            <Loc.City>Ames</Loc.City>
          </Location>
        </Edu.Location>
      </Education>
      <Address>
        <Addr.Type>Home</Addr.Type>
        <Addr.Street>567 3rd Ave</Addr.Street>
        <Addr.Location>
          <Location>
            <Loc.CountryRegion>US </Loc.CountryRegion>
            <Loc.State>MI </Loc.State>
            <Loc.City>Saginaw</Loc.City>
          </Location>
        </Addr.Location>
        <Addr.PostalCode>53900</Addr.PostalCode>
        <Addr.Telephone>
          <Telephone>
            <Tel.Type>Voice</Tel.Type>
            <Tel.IntlCode>1</Tel.IntlCode>
            <Tel.AreaCode>276</Tel.AreaCode>
            <Tel.Number>555-0114</Tel.Number>
          </Telephone>
          <Telephone>
            <Tel.Type>Fax</Tel.Type>
            <Tel.IntlCode>1</Tel.IntlCode>
            <Tel.AreaCode>276</Tel.AreaCode>
            <Tel.Number>555-0132</Tel.Number>
          </Telephone>
        </Addr.Telephone>
      </Address>
      <EMail>[email protected]</EMail>
      <WebSite />
    </Resume>
    </Resumes>

    See if these posts help: http://blogs.msdn.com/b/mattm/archive/2007/12/15/xml-source-making-things-easier-with-xslt.aspx
    http://simonlv.blogspot.ca/2012/08/ssis-step-by-step-6-use-xslt-to.html
    Arthur My Blog

  • See Multiple node names under Import manager source table of single XML

    Hi,
    I have a xml file with differnt nodes of following structure when it comes to IMport manager It shows multipletable names where I can choose Business Partner, Partner, RemoteSystem... But My maps are based on Partner only.. Now I need to update the look up Qualifer table.. of which values are in Type.. Which I am unable to see under Partner node in import manager...I dont see the fields of Type Node under Map Filed/Values tab...
    <Business_partner xlms....
    --<Partner>
    <Address>
    <name>   
    <name1>
    <Role>
    <A>   
    <B>
    <Remote SYstem>
    <name>   
    <Code>
    <Type>
    <Type>   
    <Type2>
    Can any one put there comments please..
    Thanks
    Rajeev

    Hello Rajeev
    "Import manager guide"
    page 36:
    "For XML source files, the source table list displays the nested elements defined in the XML schema."
    page 44:
    "The XML Schema list includes an entry for each XML schema defined in the MDM Console."
    page 86:
    "Ways in which the Source Hierarchy tree now reflects an XML fileu2019s structure include:
    u2022 Top-level node is the source XML file
    u2022 Tables in the tree represent nested XML structures
    u2022All tables are nested under the root element
    u2022 Fields in the tree represent data-storing XML elements
    u2022 Joins and _ID fields are no longer added or required
    With these changes, users no longer have to manually recreate the relationships implicit in the XML schema, as they are preserved by MDM and accurately reflected in the source hierarchy tree.
    NOTE ►► To ensure that Import Manager correctly interprets the structure of an XML file, specify its corresponding XML schema file in the Connect to Source dialog (see u201CStarting and Exiting the Import Manageru201D on page 43 for more information)."
    page 188:
    "When the source is an XML file, the Available Fields list is limited to nodes which are siblings (on the same level as), or children of (nested below) the currently selected Source Hierarchy tree node."
    page 213
    "For example, if a source file is in XML format, Import Manager uses a tree in the Source Fields grid to depict the nested structure of fields within the associated XML schema."
    Use XML schema for right node showing
    Regards
    Kanstantsin Chernichenka

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • How to map the node id to the node name in database view just like "V$GES_RESOURCE"

    i have a rac with 3 nodes,and the node id is from 1 to 3,i can check it with command olsnodes.
    $ olsnodes -p -n -i
    tdsdb1  1       tdsdb1-priv     tdsdb1-vip
    tdsdb2  2       tdsdb2-priv     tdsdb2-vip
    tdsdb3  3       tdsdb3-priv     tdsdb3-vip
    and i also can check it in gv$instance
    SQL> select inst_id,instance_number,instance_name from gv$instance;
       INST_ID INSTANCE_NUMBER INSTANCE_NAME
             1               1 jftds1
             3               3 jftds3
             2               2 jftds2
    but when i select the master node of some resource ,it shows some value of node id =0
    SQL> select resource_name,master_node from v$ges_resource;
    RESOURCE_NAME                  MASTER_NODE
    [0xdcc9fa12][0x246658a5],[QQ]            2
    [0x932][0x70c230e],[IV]                  0
    [0xd9fb][0x13181703],[IV]               0
    [0xddae][0x0],[TM]                       0
    [0xb970fb05][0x729b596a],[LB]            2
    [0xb580][0x70c2e1c],[IV]                 0
    [0x31ad56fb][0x7e4c3daa],[QQ]            2
    [0x3][0x797609],[HW]                     0
    [0x2bf04627][0xf28b1575],[QI]            0
    [0x19c89f33][0xd06ef447],[QQ]            0
    [0x529ae82][0x86e25d46],[QQ]             0
    it seems that the master node id is from 0 to 2
    i want to get the node name from the node id from   v$ges_resource,so i check the table cluster_nodes ,cluster_instances,but there are nothing.
    SQL> select * from CLUSTER_NODES;
    no rows selected
    SQL> select * from CLUSTER_INSTANCES ;
    no rows selected
    how can i get the node name from the node id in the tables just like " v$ges_resource"? thank you .

    my cluster ware version is 10.2.0.5
    database version is 10.2.0.5
    and the source of rac is all online
    $ crsctl query crs activeversion
    CRS active version on the cluster is [10.2.0.5.0]
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
    NLSRTL Version 10.2.0.5.0 - Production
    $ crs_stat -t
    Name           Type           Target    State     Host       
    ora.jftds.db   application    ONLINE    ONLINE    tdsdb2     
    ora....tds1.cs application    ONLINE    ONLINE    tdsdb1     
    ora....s1.inst application    ONLINE    ONLINE    tdsdb1     
    ora....ds1.srv application    ONLINE    ONLINE    tdsdb1     
    ora....tds2.cs application    ONLINE    ONLINE    tdsdb2     
    ora....s2.inst application    ONLINE    ONLINE    tdsdb2     
    ora....ds2.srv application    ONLINE    ONLINE    tdsdb1     
    ora....tds3.cs application    ONLINE    ONLINE    tdsdb3     
    ora....s3.inst application    ONLINE    ONLINE    tdsdb3     
    ora....ds3.srv application    ONLINE    ONLINE    tdsdb3     
    ora....SM1.asm application    ONLINE    ONLINE    tdsdb1     
    ora....B1.lsnr application    ONLINE    ONLINE    tdsdb1     
    ora.tdsdb1.gsd application    ONLINE    ONLINE    tdsdb1     
    ora.tdsdb1.ons application    ONLINE    ONLINE    tdsdb1     
    ora.tdsdb1.vip application    ONLINE    ONLINE    tdsdb1     
    ora....SM2.asm application    ONLINE    ONLINE    tdsdb2     
    ora....B2.lsnr application    ONLINE    ONLINE    tdsdb2     
    ora.tdsdb2.gsd application    ONLINE    ONLINE    tdsdb2     
    ora.tdsdb2.ons application    ONLINE    ONLINE    tdsdb2     
    ora.tdsdb2.vip application    ONLINE    ONLINE    tdsdb2     
    ora....SM3.asm application    ONLINE    ONLINE    tdsdb3     
    ora....B3.lsnr application    ONLINE    ONLINE    tdsdb3     
    ora.tdsdb3.gsd application    ONLINE    ONLINE    tdsdb3     
    ora.tdsdb3.ons application    ONLINE    ONLINE    tdsdb3     
    ora.tdsdb3.vip application    ONLINE    ONLINE    tdsdb3    

  • HELP NEEDED!!!displaying xml node name in an input text box

    Hello everybody
    Have a simple proble. I have imported an XML file into flash
    using the Tree component and the XML_conn component. So i have the
    xml tree displying in flash when i have run it.
    I have created an input text box called 'subject'
    All i really need is when a user clicks on any node for that
    node name to be displayed in a the input text box. thats it. ITS
    DRIVING ME CRAZY

    Try something like this. (if your Tree is called myTree)
    var myTreeListener = {}
    myTreeListener.change = function(evtObj) {
    subject.text = evtObj.target.selectedNode.nodeName;
    myTree.addEventListener("change",myTreeListener)

  • Function Module to get the node name in particular level name in Hierarchy

    Hi All,
    We have 0Material hierarchy which consists of 14 levels and materials are in the 14th level.
    We have a requirement to update the 4th level node name to all materials.
    So we have created the attribute to this 0Material and thought of updating in the transformation.
    Could you please suggest us to which function module i can in this scenario.
    Thanks in advance,..
    Prasanna

    Can you explain in more detail what exactly you want to do?
    do you want to limit hierarchy to level4?
    Regards
    Sudeep

  • ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source

    Hi,
    In abap Mapping
    <b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******
    data: incode type ref to if_ixml_node_collection.
    incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    <b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **
    data: outcode type ref to if_ixml_node.
    outcode = incode->get_item( index = 0 ).
    data irc type i.
    irc = msgtype->append_child( outcode ).
    *<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*
    data: ws_val type string VALUE 'xyz'.
    data: elementsender type ref to if_ixml_element.
    elementsender = odocument->create_simple_element(
    name = 'BUSS_DAY'
    value = ws_val
    parent = msgtype ).
    <b>Please guide me how I can assign <u>incode</u> value to ws_val.
    So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>
    i.e. How to create Different Target NODE NAME as of
    Source with same Data
    <Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source
    is not given in it.
    Thanks & Regards.

    Hi ABAPers,
    Please Guide Me .....
    <u>This is ABAP Mapping problem in XI.</u>
    <b>How can I read data from incode into ws_val.</b>
    data: <b>ws_val</b> type string
    data: <b>incode</b> type ref to if_ixml_node_collection.
    <b>incode</b> = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    Best Regards

  • XPATH to determine node name in condition of Interface determination

    Hi,
    does anybody out there know whether one can use a condition such as "name(/p1:Envelop/p1:Body/*)" to retrieve the name of the first element underneath the Body structure which is usually the payload. In the example below.  I'd like to retrieve "ns0:BAPI_USER_GET_DETAIL" or just "BAPI_USER_GET_DETAIL" which I would like to than compare in my "=" condition.
    <?xml version="1.0" encoding="iso-8859-1"?>
    <sap:Envelope xmlns:sap="urn:sap-com:document:sap" version="1.0">
      <sap:Header xmlns:rfcprop="urn:sap-com:document:sap:rfc:properties">
        <saptr:From xmlns:saptr="urn:sap-com:document:sap:transport">BC1</saptr:From>
        <saptr:To xmlns:saptr="urn:sap-com:document:sap:transport">BC2</saptr:To>
      </sap:Header>
      <sap:Body>
         <ns0:BAPI_USER_GET_DETAIL xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
          <CACHE_RESULTS/>
          <USERNAME>bauerd</USERNAME>
         </ns0:BAPI_USER_GET_DETAIL>
      </sap:Body>
    </sap:Envelope>
    I have a client that once to migrate his SAP BC interfaces to PI without having to change the sending application which is a CICS mainframe application. The mainframe application invokes various BAPI's by just passing in a different payload into the above envelope. The payload is always the request structure for the BAPI. The message is send synchronously to SAP BC which than calls the BAPI and returns the response to the caller, again in form of the above envelope and as payload the BAPI response structure.
    To convert this to PI I have to be able to initiate different interface mappings depending on what BAPI is requested. This is pretty straight forward as there are no special mapping transformation taking place in SAP BC for both the BAPI request and response. However I need to determine what interface mapping to call depending on BAPI requested by the CICS application.
    As said the customer does not want to change the sending application. The only part we are allowed to change is the URL which changes from SAP BC to the SAP PI Plain HTTP sender adapter. The post will always use the same outbound message interface. Therefore I can't use SAP PI's standard receiver determination. Using this adapter I will also be able to get access to the whole message envelope as outlined above.
    I already got all of this working nicely with the exception that I can't determine what BAPI is requested and therefore what interface mapping I have to trigger in my interface determination.
    Has anybody used a condition as above and if so how should it look like in the condition editor. The one outlined above does not seem to work. However it is also not failing in PI.
    Also I don't want to change my approach for doing this. However if it is not possible to retrieve the node name using the xpath statement (as outlined above) in the condtion editor than I will have to look for a different approach to resolve this problem. Any suggestions would than be more than welcome.
    Many thanks in advance.
    Dieter

    If the structure is not too big, you can use:
    //ns0:BAPI_USER_GET_DETAIL EX
    otherwise take the full path:
    /p1:Envelop/p1:Body/ns0:BAPI_USER_GET_DETAIL EX
    The namespaces have to be declared.
    Regards
    Stefan

  • How to Display Detailed navigation passing Top level navigation node name

    Hi All,
    I have prepared a DLN par file but unfortunatly my requirement is such that I need to pass one of the toplevel node name as input parameter and that should display the corresponding DLN which is from 3rd level.
    I have checked in sdn for passing a value to the navigation tag lib which will consider it as a selectednode but could find none.
    Can some body suggest me how to acheive this.
    Thanks in Advance.
    Sai Krishna. K

    Hi Kiran,
    Thanks for your Reply..
    Following is my Scenario:
    I use 2 same versions of portals connected via federated portal concept.
    I have my detailed navigation par file in portal2 and was calling it from portal1 from a iview.
    Since I am not physically navigating in portal2(which mean there is no selected node to iterate ), when I call that iview in portal1 it is picking up only 1st node in top level navigation.
    So i need to pass "My reports" (as 1st level) & "India" (as 2nd level) as parameters such that it gets only its DTN at all times from 3rd level.
    Hope you understand my scenario, below is my iteration code logic.
    <div id="myslidemenu" class="jqueryslidemenu">
    <ul>
         <nav:iterateSelectedNavNodesLevel level="<%=START_LEVEL%>">
         <%-- the 'currentDepth' attribute provides the byte value of the current level --%>
        <nav:recurseNavNodeChildren currentDepth="depth">
             <% current = start + depth.intValue() - 1; %>
             <%=writeClosingTags(last - current)%>
             <%
            last = current;
            %>
            <%-- we want to distinguish between folder and leaf nodes so we can use different graphics --%>
              <%-- complete the html syntax for the 'class' attribute pass it as an anchor attribute--%>
              <li><nav:navNodeAnchor navigationMethod="byURL" />
              <%-- checks for additional navigation level and the appropriate html tags to accomodate them --%>
            <nav:ifNextRecursionDepthWillIncrease>
                <ul>
            </nav:ifNextRecursionDepthWillIncrease>
            <nav:ifNextRecursionDepthWillNotChange>
                </li>
            </nav:ifNextRecursionDepthWillNotChange>
        </nav:recurseNavNodeChildren>
        <%=writeClosingTags(last - start)%>
        <% last = start; %>
    </nav:iterateSelectedNavNodesLevel>
    </ul>
    </div>
    As per the passing parameter concept please explain me a bit more clear with step by step procedure.
    <b>Here if not passing parameters, providing static values will also do for my requirement.</b>
    Many Thanks,
    Sai Krishna.
    Edited by: Konchada Sai Krishna on Feb 14, 2009 9:42 PM

  • How do I pull XML data by a node name?

    I am new to Flash and XML so I hope I am not asking a
    completely dumb question. I have figured out how to retrieve data
    from and XML file by the node possition but now I would like to
    know how to pull it by a specific node name. Here is what I
    currently have:
    on (rollOver)
    myLot = 1;
    _root.myInfo =
    _root.myXML.childNodes[0].childNodes[this.myLot].childNodes[0].childNodes[0].nodeValue;
    With XML file like this:
    <SectionOne>
    <Lot1>
    <Lot>1</Lot>
    <Price>$450,000</Price>
    <Status>Active</Status>
    </Lot1>
    <Lot4>
    <Lot>4</Lot>
    <Price>$389,000</Price>
    <Status>Sold</Status>
    </Lot2>
    </SectionOne>
    What I would like is to pull instead of
    childNodes[this.myLot] to pull the node named Lot1. The problem I
    have is I don't always have consecutive lot numbers and I don't
    want to have to build in blank xml lines for a placeholder. I hope
    that makes sense.

    Sorry for the delay. I originally posted this on the
    newsgroup, but I suppose it did not propagate to here.
    What you would do is use a loop statement and compare the
    nodeNames.
    To see a nodes name such as Lot1 you use:
    childNodes[x].nodeName
    // Load up the lotNodes object
    lotNodes = _root.myXML.childNodes[0];
    // Now lotNodes contains all the nodes Lot0, Lot1, Lot2.....
    // Iterate through all of lotNodes childNodes and compare the
    // nodeName until you find the one you want then drill down
    // it to get the info you want.
    for( var counter01 = 0;counter01 <
    lotNodes.childNodes.length;counter01++){
    if(lotNodes.childNodes[counter01].nodeName == "Lot1"){
    myInfo =
    lotNodes.childNodes[counter01].childNodes[0].childNodes[0].nodeValue;
    I have not had time to test this but it should work, I'll
    double check it after work.
    I hope this helps get you moving forward.
    If you have any other problems or can't get it to work, let
    me know here or email me. Preferably here, so others can learn and
    help.
    Scotty
    [email protected]

  • Hierarchy from flat file loading with errors - duplicate node names

    Hello experts,
    I am loading a product hierarchy from a flat file into a custom hierarchy
    object.  The issue is that it errors out saying I am loading
    duplicates within nodes, however all node IDs within a level are unique.
    It seems to be looking at the node name to determine uniqueness and I know
    we have some duplication within the text there especially when you factor
    in the 32 character limitation for the node name.  Does anyone have an idea
    as to whether it is possible to have it only consider the node ID instead
    of the node name to determine uniqueness?
    A colleague suggested using the link ID to fix this problem but I don't know how that field works or how to populate it.
    I'm working in a BI 7.0 environment (I don't know if that makes a difference since you still have to use the 3.x objects to extract the hierarchy).
    Any help would be appreciated.
    Nancy

    Hi Nancy,
    You may wish to check this OSS Note 1026749 - Hierarchies: Consistency check for duplicate nodes and 912115 (old one)
    Symptom -
    When you load or activate a hierarchy it terminates with error message RH 109 or RH 211. The hierarchy contains duplicate nodes and this is not allowed. The long texts of messages RH 109 or RH 211 do not describe the reason for the problem sufficiently or they are partially incorrect.
    There is uncertainty about in which cases duplicate nodes exist in a hierarchy and in which cases duplicate nodes are allowed.
    Hope this helps,
    Bye...
    Naga Timmaraju

  • Load special character £ in node name

    Hi,
    I am importing the hierarchies with special character £ and once imported it shows as following before the node name:
    small square box in place of £ with UTF8 as character encoding while importing and
    ? mark in place of £ with ASCII or ANSI as character encoding while importing.
    Please let me know how to get the £ in the node name.
    Thanks,
    Ravi

    Got it,
    Save the text file itself in UTF format and then import with UTF8 encoding in DRM.
    Thanks,
    Ravi

  • How to read a xml node name in xsl? Urgent!

    Hi,
    I've a dynamic xml which gets generated at runtime. The basic nodes remain same but the content and nodes vary.
    - <root>
    - <list>
    - <row>
    <courseStartDate></courseStartDate>
    <courseEndDate></courseEndDate>
    <courseName>ORACLE</courseName>
    </row>
    - </list>
    </root>
    I have an xsl which would read the values
    as :
    <xsl:value-of select="courseStartDate"/>
    I would like to know if its possible to read the node name "courseStartDate" through xsl, which could be stored in a variable and then the corresponding value could be retrieved??
    Thanks

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • Content node name problem during creation on portal 9.2 cm filesystem repo

    Hi all,
    We are developing a portal site using weblogic portal server 9.2.
    We are using the portal built-in content management system of the portal admin app. And We use the filesystem repository (with library service disabled) to store our content data by following the setup on documentatation.
    We use the create_db.cmd script to create the cms tables in a oracle database. The input contents' binary files and metadata are successfully stored in the filesystem directory and database correspondingly.
    However, we encountered some bugs/unexpected behaviour on creating/uploading binary data when using the content creation form.
    The problem is that when we try to create a content with one (required and primary) binary property, the node name of the new content does not always follow the name input by the user. The content node name will changed according to the uploaded file or the binary property name defined in content type, which are unexpected behaviour. In fact, we expect the node name stay as the same (with extension padded) of what user input on creating it and the property's filename should use this name.
    When we use the WYSIWYG editor to create the document of the binary property, after saving the document, the filename of this binary property automatically changed to the content type's property name, after clicking save button on the content, the node name of the content changed to the content type's property name too!
    When we upload file for this binary property, the property 's filename changed to the uploaded file's filename, and changing the node name of that content too!
    We would like to know what would cause this kind of misbehaviour/bug,
    could it be caused by misconfiguration on server? the filesystem repository? the database scheme?
    Any helps or suggestions on it would be greatly appreciated.
    Best Regards,
    Keaton

    Thanks for the reply jalpesh, you answered the filename on file upload method.
    But what about the filename changes due to create document (WYSIWYG editor) method. The content filename changed to the property-name.ext about saving the content, which is quite a strange behaviour. As the user will not be able to add the same type of content on current directory cause the content filename follow the property-name.ext and cause same filename conflicts when saving.
    We are using the weblogic portal server 9.2 MP 2 with oracle database (bea type 4 connection driver).
    Any advices or suggestions?
    Regards,
    Keaton

Maybe you are looking for