Recover the xml tag

Hi,
Unfortunately the xml tags deleted in my document (full content), if it possible to recover?

sorry for irking so much..
i did like this..
NodeList childNodes = e.getElementsByTagName("objectstore");
          for(int s=0; s<childNodes.getLength() ;s++)
               Element el = (Element)childNodes.item(s);
NodeList nl2 = el.getElementsByTagName("name");
                    for(int i = 0; i < nl2.getLength(); i++)
Node nN = nl2.item(i);
if(nN.hasChildNodes())
NodeList listL = nN.getChildNodes();
for(int j = 0; j < listL.getLength(); j++)
Node nN2 = listL.item(j);
String name =nN2.getNodeValue();
                                                  out.println(name);
in this way iam getting the name tag value as well as the value of name tag which is in properties node.i want to display only one name tag value which is after the id tag..how can prevent this.

Similar Messages

  • How to get the XML TAG name itself instead of TAG value

    Hi All,
    I have a question here
    I want to retrieve the XML tag from a XML file instead of its value.
    Example:
    <item>Colgate</item>
    Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
    How to do that...?
    Thanks
    -Praveen

    You can do this with an axes XPatch expression:
    child::node()/name()
    For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
    HTH,
    Bas

  • How to Find the XML Tag in indesign

    HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br />  <head><br />   <para><br />    <bold><br /><br />Thanks,<br />C.K.Venkatesan

    I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,

  • How to get the value in the XML tag?

    hi all,
    i am new to JAXP. i tried the sample program provided in the following link. it just counts the number of tags in the XML file. XML file name is given as command line argument.
    Now, if i want to display the value in the XML tag( say <NAME>xxx</NAME> in this tag i want to display the value 'xxx' ), what has to be done?
    how can i achieve this?
    please help...
    link of the sample program:
    http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/samples/SAXLocalNameCount/SAXLocalNameCount.java
    thx in advance,
    -Soni.

    implement this method the same way you have startElement...
    public void characters(char[] ch,
                           int start,
                           int length)
                    throws SAXException

  • How to add attributes in the xml tag

    hi,
    i have two tables employee,department
    employee table
    empno number,
    empname varchar2(100),
    deptno number,
    department table
    deptno number,
    deptname varchar2(100)
    i want xml file in the above mentioned two tables.The xml file is as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <EmployeeInfo>
    <Data type="employee">
    <empno>1</empno>
    <empname>siva</empname>
    <deptno>10</deptno>
    </data>
    <Data type="department">
    <deptno>10</empno>
    <deptname>IT</empname>
    </data>
    </EmployeeInfo>
    can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent
    By
    Siva

    A general example (based on the OE sample data/tables)
    SQL>SELECT XMLElement("Emp",
      2                     XMLAttributes(employee_id AS "id"
      3                                  , '10' "dept"),
      4                     first_name||' '||last_name) as result
      5 FROM   employees e
      6 WHERE  department_id = 10;
    RESULT
    <Emp id="200" dept="10">Jennifer Whalen</Emp>

  • How to form a regular expression for matching the xml tag?

    hi i wanted to find the and match the xml tag for that i required to write the regex.
    for exmple i have a string[] str={"<data>abc</data>"};
    i want this string has to be splitted like this <data>, abc and </data>. so that i can read the splitted string value.
    the above is for a small excercise but the tagname and value can be of combination of chars/digits/spl symbols like wise.
    so please help me to write the regular expression for the above requirement

    your suggestion is most appreciable if u can give the startup like how to do this. which parser is to be used and stuff like that

  • Unable to define the XML tags with colon in XPath using gluecode

    Hi Everyone,
    I am working on XML with InDesign CS4. I need to do some automation stuffs for those. In my InDesign document, the XML tags (Eg. <ab:para>, <ab:figure> & etc…) name contains colon characters. If i try to loop these tags through gluecode using XPath expression, the script throws me a error like 'Adobe InDesign cannot processXPath expression'.
    Can anyone look into this and suggest me a right solution.
    Thanks in advance.
    Thiyagu

    Hi thiyagu,
        this.xpath = "//para";
        this.xpath = "//figure";
    Try this without the XML namespace in XPath Expression.  it's not tested code,  but it may works.
    Regards,
    Nagaraj

  • Please help me with the XML tag reading.

    I have an content.xml with thouthand <table:table-row /> tags.
    How can I read the attributes and values of the tag 150 for example?
    Should I read one tag after the other before I reach 150, or there is a shorter way?
    XML Structure of content.xml as example below.
    In this sample I want to get the row4 and its value D4. Of course I don't know what value have the fourth tag and can't search tag with a value D4. I just know that the Row4 contains the value I need.
    Is there any possibility to read the fourth tag, or I should read from the beginning and increase the counter. If the counter is 4, I should read the value. It seems to me not a good approach, because the files can contain thousands of tags and for each value to go throught the whole xml is resource-intensive.
    <table:table table:name="Sheet1" table:style-
    name="ta1" table:print="false">
    <table:table-column table:style-name="co1" table:
    number-columns-repeated="7" table:default-cell-
    style-name="Default"/>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C1</text:p>
    </table:table-cell>
    <text:p>D1</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C2</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>E2</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C3</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="4"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B4</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>D4</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    <table:table-cell office:value-type="string">
    <text:p>E5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1" table:number-rows-repeated="2">
    <table:table-cell table:number-columns-repeated="7"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell table:number-columns-repeated="4"/>
    <table:table-cell office:value-type="string">
    <text:p>E8</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>G8</text:p>
    </table:table-cell>
    </table:table-row>
    </table:table>

    Thanks for the answer.
    And is there any possibility to get the tag with the value 5. I know that the fifth tag should contain the value I want, in this case 5. But there is an attribute, and if this attribute is not null, then some tags1 can be shifted so that the third tag1 have an attribute tags=2, so I know that there is no the fourth tag and I read the next tag as fifth (with XPath doc/tag[4]).
    Should I read all tags, or there is some other way with the XPath. To search for the first tag with attributes and if its position before the fifth tag, than to decrease the tag-position counter and so on.
    <doc>
    <tag1>1</tag1>
    <tag1>2</tag1>
    <tag1 tags=2>3</tag1>
    <tag1>5</tag1>
    <tag1>6</tag1>
    </doc>Thanks in advance.

  • Replace the XML Tags which are in binary format in 4.6C Version

    Hi Experts,
    I have an issue. I am working on 4.6 c version of sap. I have a requirement to send  ftp of an xml file. I created an internal table which has components of table type too ( For Line items ). After appending a record of sales order into the table I am using   SDIXML_DATA_TO_DOM ( To attach the to the document ) and SDIXML_DOM_TO_XML ( To convert the document contents into XML ( Binary Format ).
           CLASS cl_ixml DEFINITION LOAD.
          g_ixml = cl_ixml=>create( ).
          CHECK NOT g_ixml IS INITIAL.
          m_document = g_ixml->create_document( ).
          CHECK NOT m_document IS INITIAL.
          CALL FUNCTION 'SDIXML_DATA_TO_DOM'
            EXPORTING
              NAME               = 'xmldata'   " data in character format
              DATAOBJECT         = xmldata[]
           IMPORTING
             DATA_AS_DOM        = l_dom
           CHANGING
             DOCUMENT           = m_document
           EXCEPTIONS
             ILLEGAL_NAME       = 1
             OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CHECK NOT l_dom IS INITIAL.
          w_rc = m_document->append_child( new_child = l_dom ).
          IF w_rc IS INITIAL.
          WRITE 'OK'.
          ELSE.
          WRITE: 'ERR ='.
          ENDIF.
          CALL FUNCTION 'SDIXML_DOM_TO_XML'
            EXPORTING
              DOCUMENT            = m_document
            PRETTY_PRINT        = ' '
            IMPORTING
              XML_AS_STRING       = w_string
              SIZE                = w_size
            TABLES
              XML_AS_TABLE        = it_xml   " Final XML data ( with xml tags ( xml tags are the field names of internal table ) ) in bin
            EXCEPTIONS
              NO_DOCUMENT         = 1
              OTHERS              = 2
          IF SY-SUBRC = 0.
          WRITE 'OK'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSE.
          WRITE: 'ERR =',
          sy-subrc.
          ENDIF.
    So, it_xml has the binary format of XML data.
    Now the requirement is that I need to get rid of some XML tags in the final internal table XML data. Because by default, at the start of the the table row the <item> and </item> tags are inserted. This is automatically done in the Function module
    SDIXML_DOM_TO_XML.
    I want to find out the binary string of <item> and </item> and replace them by null binary string. I know how to replace the character strings but not for binary strings in 4.6 C.
    It is little bit urget. I would appreciate the quicker answer.

    Hi,
    check this program , I think this will help you
    TYPE-POOLS: ixml.
    TYPES: BEGIN OF xml_line,
    data(256) TYPE x,
    END OF xml_line.
    data : itab like catsdb occurs 100 with header line.
    data : file_location type STRING.
    data : file_name like sy-datum.
    data : file_create type STRING.
    file_name = sy-datum .
    file_location = 'C:\xml\'.
    concatenate file_location file_name into file_create.
    concatenate file_create '.XML' into file_create.
    DATA: l_xml_table TYPE TABLE OF xml_line,
    l_xml_size TYPE i,
    l_rc TYPE i.
    select * from catsdb into table itab.
    append itab .
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR =
    I_LINE_HEADER =
    I_FILENAME =
    I_APPL_KEEP = ' '
    I_XML_DOC_NAME =
    IMPORTING
    PE_BIN_FILESIZE = l_xml_size
    TABLES
    i_tab_sap_data = itab
    CHANGING
    I_TAB_CONVERTED_DATA = l_xml_table
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 24
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
    bin_filesize = l_xml_size
    filename = file_create
    filetype = 'BIN'
    CHANGING
    data_tab = l_xml_table
    EXCEPTIONS
    OTHERS = 24.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    write : 'INTERNAL TABLE DATA IS SUCCESSFULLY DOWNLOADED TO LOCATION', file_create .
    Thanks.

  • Getting unwanted values between the XML tags in XSLT mapping

    Hi Folks
    I have come across a very strange situation with my xslt mapping.
    I am getting unwated values "11" between xml tags
    as follows
    <Tag>0001</Tag>
    11
    <DataID>3</DataID>
    I am not sure why I am getting these values in between the tags. Any suggestions would be appreciated.

    Hi David,
    Here is the code fragment where these 2 tags are mapped, FYI, the source is an IDOC message. The unwanted "11" is coming After the <Tag></Tag> and <DataID></DataID>. FYI, Fof the element <Tag></Tag> its a default value. But for <DataID> </DataID>  I have the mapping logic.
    <Order>
                <OrderHeader>
                  <Tag>009</Tag>
                  <xsl:for-each select="E1EDKA1">
                    <xsl:choose>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U960'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
                      <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U300'">
       <DataID>
                        <xsl:value-of select="'3'" />
           </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U930'">
       <DataID>
                        <xsl:value-of select="'1'" />
       </DataID>
                      </xsl:when>
       <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U400'">
       <DataID>
                        <xsl:value-of select="'3'" />
       </DataID>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="'1'" />
                      </xsl:otherwise>
                    </xsl:choose>
                   </xsl:for-each>

  • Setting the XML tag value in Java script

    Hi,
       I am trying to set a XML tag value in the initialize event of a text field.. The code works fine in FormCalc but I needed it to work in java script.
         FormCalc:
         $record.prospectApplication.typeName = "namedInsured";
         Java Script:
         xfa.record.prospectApplication.typeName = "namedInsured";
         The above JavaScript does not work. Can any one help on this?
    Thanks
    Srini

    Hi Srini,
    In JavaScript you don't get any default properties so you need to say;
    xfa.record.prospectApplication.typeName.value = "namedInsured";
    That is assign the value to the "value" property not the dataValue object.

  • How to recover the social tags of a user in SharePoint 2010 ?

    Dear All,
    I have mistakenly deleted the social tags for a user from Manage Social Tags and notes page in Central Administration -> User Profile Service Application. How can I recover those social tags for the user ?
    I do not want restore the old backup of social DB in production. Any other ways we can recover the tags ?
    Please help.
    Samarendra Swain(Sam)
    Team Sharepoint
    http://www.techmahindra.com/

    Hello Geeth,
    You can get this information from published DB.
    SELECT R.RES_NAME,SG.WSEC_GRP_NAME
    FROM MSP_WEB_SECURITY_GROUP_MEMBERS AS SGM INNER JOIN
    MSP_WEB_SECURITY_GROUPS AS SG ON SGM.WSEC_GRP_GUID = SG.WSEC_GRP_GUID INNER JOIN
    MSP_RESOURCES AS R ON SGM.WRES_GUID = R.RES_SECURITY_GUID
    where r.res_type <=2
    order by RES_NAME
    Microsoft do not recommend use published DB for reporting. However this is only way I know to get this detail.
    Thank you,
    Kiran K.
     

  • Validate the XML tag value and display the Binding data in XDP

    Hi,
    I am new to Adobe Life Cycle.... and i am working on the following requirement and XML file is enclosed...
    1. Need to validate the XML value of <pp> with condition
    2. Basing on the value of <pp>, need to display the <ct> values in text field
    If i simply bind, it takes the values from top of array and display..
    Please suggest how to restrict the binding values basing on the condition.
    Thanks
    Madhu

    Hi Paul,
    Thank you for quick respose.
    The solution which you have give me not excatly looking for.... working for the solution in alternative methods...
    Regards
    madhu

  • How to get the attribute of the xml tag

    I have the following xml file
    Example.xml
    <?xml version="1.0" encoding="iso-8859-1"?>
    <html><set label="09/07/29" value="1241.90"/>
    </html>
    Can any one help me in parsing this xml file
    I want to retrive the attribute values of the tag set
    Example I want to store 09/07/29 to variable1 and 1241.90 to variable2 in order to insert this data into a database table.
    Appreciate if any one can help me..very urgent

    Dup post.
    Answers provided at {message:id=3658564} and {message:id=3658522}

  • How to comment the xml tags using java

    Iam using a xml file i want to comment some of the tags in that file

    And your quesion is? Did you parse it into a Document and do you want to write a changed version into another file?

Maybe you are looking for

  • Euro symbol not displayed in pdf

    Hi, I am not getting euro symbol in pdf. Instead of that, I am getting '?'. When i query the database I am getting euro symbol. the data type is VARCHAR2. Thanks in advance.

  • User-defined points in contouring

    Hi, I'm using PCI-7344 & UMI 7764 to control dc motor on servo mode, but i have a question, when i define contouring points that value was smaller than 1000, the program was worked, but when the value was greater than 1001, there was an error. thanks

  • AFS : Material master to Grid Assignment

    Dear Experts, Need your help on AFS, how to assign Materials to GRID? Thanks in advance

  • Some Problems in Using Region Containers

    Hi, I have some problems in using region container which looks like bugs to me : 1- I added 2 Item Regions to one group in app def and dragged some items into them.Then, I decided to have a region container and arrange these 2 item regions horizontal

  • Everytime I open Itunes all my songs start redownloading

    Once the download completes, it starts all over again.  Any suggestions?