CS4-JS : Read XML file and getting Attributes

Dear All,
How to get the Attributes based on the RootElements.
For Example:
//========================== XML File : Start ================================//
<stag>
     <cust>
        <custname>120</custname>
         <atagst name="alpha" attributename="1" attributevalue="2" sty="First"/>
         <atagst name="beta" attributename="1" attributevalue="5" sty="Second"/>
         <atagst name="gama" attributename="1" attributevalue="2" sty="Third"/>
          <atagst name="theta" attributename="1" attributevalue="5" sty="Fourth"/>
      <cust>
     <cust>
         <custname>121</custname>
          <atagst name="A.alpha" attributename="1" attributevalue="2" sty="First"/>
          <atagst name="A.beta" attributename="1" attributevalue="5" sty="Second"/>
         <atagst name="A.gama" attributename="1" attributevalue="2" sty="Third"/>
          <atagst name="A.theta" attributename="1" attributevalue="5" sty="Fourth"/>
      <cust>
     <cust>
         <custname>122</custname>
          <atagst name="B.alpha" attributename="1" attributevalue="2" sty="First"/>
          <atagst name="Bbeta" attributename="1" attributevalue="5" sty="Second"/>
         <atagst name="B.gama" attributename="1" attributevalue="2" sty="Third"/>
          <atagst name="B.theta" attributename="1" attributevalue="5" sty="Fourth"/>
      <cust>
</stag>
//==========================  XML File : End ================================//
Here I want to check through Java Script Code [InDesign]
//======================== Script : Starts ====================================//
var myEveryName = new Array();
traverse(roots);
  for(var Element_name=0; Element_name<myEveryName.length; Element_name++)
                  if(myEveryName[Element_name] == "customername")
                                  custname.push(myEveryContent[Element_name]);
                if(myEveryName[Element_name] == "applytagstyle")
                            Aname.push(myEveryAttributes[Element_name][0]);
                             Aattributename.push(myEveryAttributes[Element_name][1]);
                             Aattributevalue.push(myEveryAttributes[Element_name][2]);
                             Asty.push(myEveryAttributes[Element_name][3]);
function traverse(tree) {
    myEveryName.push(tree.name()); 
    if(tree.elements().length() > 0) {
        for(var i=0; i<tree.elements().length(); i++) {
            traverse(tree.elements()[i]);
//========================  XML File : End ====================================//
Everything working fine, but I couldn't get attribute values. Please check the below example
For Example:
If you check first root element in above xml code
i need the output like
custname=120
name=alpha,beta,gama,theta
attributename=1,1,1,1
attributevalue=2,5,2,5
sty=first,second,third,fourth
custname=121
Please any one can help me and give me the solutions.
Thanks & Regards
T.R.Harihara SudhaN

Few questions:
1. Your XML is not well formed.
2. Secondly, I do not see any relation of XML with script. For instance, I do see any elements "customername", "applytagstyle" in input.
3. Either you have not provided the complete source or either your dummy XML is incorrect.
Anyways, having a quick look, I guess you are trying to get specific attributes values from XML tree. I will try to give you a kick start though you will be required to customized the script as per requirement (for instance rearranging the attribute values in array and so forth). Otherwise please try to post complete inputs.
#include "glue code.jsx"
//Get the attribute values of all elements
main();
function main(){
if (app.documents.length != 0){
var myDoc = app.activeDocument;
var myRuleSet = new Array (
new findObjAttribute("//*")
with(myDoc){
var elements = xmlElements;
__processRuleSet(elements.item(0), myRuleSet);
else{
alert("You have no document open!");
exit();
function findObjAttribute(XPATH){
this.name = "findObjAttribute";
this.xpath = XPATH;
this.apply = function(myElement, myRuleProcessor)
var elmName=myElement.markupTag.name;
with(myElement){
try {
var Name=myElement.xmlAttributes.itemByName("name").value;
var AttName=myElement.xmlAttributes.itemByName("attributename").value;
var AttValue=myElement.xmlAttributes.itemByName("attributevalue").value;
var AttSty=myElement.xmlAttributes.itemByName("sty").value;
$.writeln("Name: "+Name);
$.writeln("AttributeName: "+AttName);
$.writeln("AttributeValue: "+AttValue);
$.writeln("Sty: "+AttSty);
     } catch(e){};
return true;
This will just print the values JavaScript console.
HTH,
Pankaj Chaturvedi

Similar Messages

  • JAVA Read XML file and modify attribute values based on some conditions

    I have the following XML file "C:/Data.xml".
    If the attributes on Dimension, Metirc, Data date Matches then Add the amount values and remove the duplicate DS node.
    I looked some examples on hashtable/hashmapping but I could not find that meets my creiteria. I appriciate any direction or suggestions on this.
    <ED LG="US">
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric ref_name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="30" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="40" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-05T00:00:00" amount="20" />
    </Metric>
    </Dimension>
    </DS>
    </ED>
    Expected Result:
    <ED LG="US">
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric ref_name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="70" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-05T00:00:00" amount="20" />
    </Metric>
    </Dimension>
    </DS>
    </ED>
    thanks
    Edited by: user7188033 on Mar 19, 2011 1:40 PM
    Edited by: user7188033 on Mar 19, 2011 2:01 PM
    Edited by: user7188033 on Mar 19, 2011 2:02 PM

    Use XSLT for transforming the XML document.

  • Please recommend if we have options to read xml file and insert data into table without a temporary table.

    Please recommend if we have options to read xml file and insert data into table without a temporary table. 

    DECLARE @data XML;
    SET @data =N'<Root>
    <List RecordID="946236" />
    <List RecordID="946237" />
    <List RecordID="946238" />
    <List RecordID="946239" />
    <List RecordID="946240" />
    </Root>'
    INSERT INTO t (id) SELECT T.customer.value('@RecordID', 'INT') AS id
    FROM @data.nodes('Root/List')
     AS T(customer);
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to read XML file and update the data in MS CRM 2011?

    Hi Folks,
    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
    Please let me know if any ways of handling it in simple ways.
    Thanks,
    Sri

    HI,
    How to read XML file:
    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
    How to work with CRM:
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.
    More information here about service functions:
    https://msdn.microsoft.com/en-us/library/gg328198.aspx

  • Reading XML file and skip certain elements/attributes??

    Hi folks!
    Suppose I have a XML file looking like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE dvds SYSTEM "DTDtest.dtd">
    <dvds>
    <dvd>
    <title>
    Aliens
    </title>
    <director>
    James Cameron
    </director>
    <format>
    1.85:1
    </format>
    </dvd>
    <dvd>
    <title>
    X-Men
    </title>
    <director>
    Bryan Singer
    </director>
    <format>
    2.35:1
    </format>
    </dvd>
    </dvds>
    In my Java application I want to read this XML file and print it on the screen (including all tags etc). So far, so good. BUT, if I want to skip certain elements, i.e. all information about the dvd 'X-Men', how am I supposed to do this? In other words, I would like my app to skip reading all information about X-Men and continue with the next <dvd>... </dvd> tag. Is this possible?
    My code so far is from the XML tutorial from Sun and it looks like this:
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class MyXML extends DefaultHandler
    public static void main(String argv[]) {
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new MyXML();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler);
    } catch (Throwable t) {
    t.printStackTrace();
    System.exit(0);
    static private Writer out;
    //===========================================================
    // SAX DocumentHandler methods
    //===========================================================
    public void startDocument()
    throws SAXException
    emit("<?xml version='1.0' encoding='UTF-8'?>");
    nl();
    public void endDocument()
    throws SAXException
    try {
    nl();
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    * <p>This method prints the start elements including attr.
    * @param namespaceURI
    * @param lName
    * @param qName
    * @param attrs
    * @throws SAXException
    public void startElement(String namespaceURI,
    String lName, // local name
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
    String eName = lName; // element name
    if ("".equals(eName)) eName = qName; // namespaceAware = false
    emit("<"+eName);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength(); i++) {
    String aName = attrs.getLocalName(i); // Attr name
    if ("".equals(aName)) aName = attrs.getQName(i);
    emit(" ");
    emit(aName+"=\""+attrs.getValue(i)+"\"");
    emit(">");
    public void endElement(String namespaceURI,
    String sName, // simple name
    String qName // qualified name
    throws SAXException
    emit("</"+qName+">");
    * <p>This method prints the data between 'tags'
    * @param buf
    * @param offset
    * @param len
    * @throws SAXException
    public void characters(char buf[], int offset, int len)
    throws SAXException
    String s = new String(buf, offset, len);
    emit(s);
    //===========================================================
    // Utility Methods ...
    //===========================================================
    // Wrap I/O exceptions in SAX exceptions, to
    // suit handler signature requirements
    private void emit(String s)
    throws SAXException
    try {
    out.write(s);
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    // Start a new line
    private void nl()
    throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    out.write(lineEnd);
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    Sorry about the long listing... :)
    Best regards
    /Paul

    A possibility that comes to mind is to create an XSLT script to do whatever it is you want - and call it from inside the program. The XSLT script can be stashed inside your .jar file by using getClass().getClassLoader().getResource("...")
    - David

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • Code to read xml file  and display that data using sax parser

    Hai
    My problem I have to read a xml file and display the contents of the file on console using sax parser.

    here you go

  • How to Read Xml File and view into Data Grid View?

    hi all
    my Data into Xml file are:
    <Voucher>
    <Header>
    <txtHeaderId>259803</txtHeaderId>
    <txtDate>2015/02/01</txtDate>
    <txtDocNo>20</txtDocNo>
    <txtMemo>This is a Test .</txtMemo>
    </Header>
    <Item>
    <txtItemId>8562803</txtItemId>
    <txtHeaderRef>259803</txtHeaderRef>
    <txtDesc>This is Number 1</txtDesc>
    <txtDebit>350000</txtDebit>
    <txtCredit>0</txtCredit>
    <txtItemId>8562804</txtItemId>
    <txtHeaderRef>259803</txtHeaderRef>
    <txtDesc>This is Number 2</txtDesc>
    <txtDebit>0</txtDebit>
    <txtCredit>350000</txtCredit>
    </Item>
    </Voucher>
    now i have two DataGridViews 
    i want that data from xml file show into the DataGridViews by this codes:
    Private Sub btnReadXmlFile_Click(sender As Object, e As EventArgs) Handles btnReadXmlFile.Click
    Dim Document As XmlReader = New XmlTextReader(txtPath.Text)
    Dim ds As New DataSet
    ds.ReadXml(Document)
    DataGridView1.DataSource = ds.Tables(0)
    End Sub
    but i see this result:
    why i do not see any result into DataGridView2(Item)
    how to solve it ?
    please help me .
    thanks all
    Name of Allah, Most Gracious, Most Merciful and He created the human

    now how to correct it?
    Name of Allah, Most Gracious, Most Merciful and He created the human
    Please be explicit - I'm the only other one in this thread so I assume it's to me, but usually I just ignore the posts when the user isn't specific.
    I don't know what there is to correct. Create a NEW dataset in code, add the two tables, and use the methods that I suggested.
    I'm not a database guy so I can't get real specific. I create my own stuff in classes and use that but, if you're using SQL then there are lots of pro's here that can help you with specifics. I'm sure they'll need to know a lot more about your data, the
    connection, and all that, but the concept should be fairly simple to implement.
    Still lost in code, just at a little higher level.

  • How to read xml file and place it into an internal table...

    hello all,
    can any one help me in - how to read xml data file (placed in application server) and placing the same into an internal table (remove the xml tags or say fetching the xml data without xml tags).

    Hi Murashali,
    use this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • How to read spool file and get the spool file number

    Hey everyone.
    I created a program ztemp that is calling another program ztemp2 within, ztemp2 creates a spool file. Now the requirement is I need to write a code within ztemp to download that spool request and then convert it to the pdf file. I know I can use program rstxpdft4 to convert the spool file to the PDF but for this I need to give the spool number, so can you please tell me how can I get the spool number and then fetch it to the program rstxpdft4 .
    Thank you.
    Rhul goel

    Hi,
       Please check the [link|Convert ABAP List to PDF and display without downloading first; (Rich's reply) and get the spool similarly.
    Or read from table TSP01 to get the latest spool using sy-uname.
    Regards,
    Srini.

  • Read XML file and generate a XLS file?

    Hi Guys,
    How I can generate a XLS file with information in a XML file.
    I have a XML which received information from a form.
    To the user see the information inside a XML file, I created a report.cfm with the informations of the users.
    Now the user want which the information in the XML, generate a XLS file from a CFM file to download.
    How I will transformed this information in a XLS file?
    Thanks,
    Fabiano Magno Pechibella

    There is no need to re-invent the wheel. Raymond Camden has published code that converts information from a form to an Excel file. His method first converts information from a form to a query. But you can easily adapt it to your case. If you do not have direct access to the form, you will still be able to convert the XML data into the name-value pairs in the query.

  • A web service that returns a xml file and gets another xml file as input?

    Hi,
    I want to create a web service which gets an xml document as input then returns again an xml document.How can I create this kind of web service?
    Is this kind of implementation is possible?
    public Document mywebservice(Document input){
    Document d;
    return d;
    or do I have to use serialization processes which I don't know very much.
    I am waiting for your help.Thank you...

    If you want to deal directly with the Document and not want the SOAP engine to serialize/deserialize the XML into Java objects, then you can easliy implement this using Axis. Look at the Axis documentation (http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage) under the heading "Message Services". One of the provided API methods that Axis provides is in the form you want: public Document method(Document body). Hope that helps. As for how to implement the service using Axis, that is beyond the scope of this forum. Check the Axis docs for more help on that.

  • Reading the datas in the Xml file  and store it in the array using java

    Hi every one
    Can any one send me the java coding for traversing through XML file and get the data and store it in the array (SAX parser is prefered)
    its a urgent requirement . please help me
    Regards
    Arun

    i send it to ur mail id ,
    could you please send me a mail to [email protected]

  • Parse XML file and extract data

    I'd like to parse an XML file and get some data extracted as columns.
    Input file country.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <MAS Action="Insert">
    <Country ObjectId="100000000000000009" VersionId="8"><Id>1</Id><NlTexts><Name Language="de">Land1</Name><Name Language="en">Country1</Name></NlTexts></Country>
    <Country ObjectId="100000000000000033" VersionId="2"><Id>2</Id><NlTexts><Name Language="de">Land2</Name><Name Language="en">Country1</Name></NlTexts></Country>
    </MAS>
    I'd like to parse the xmlfile in order to get the following output
    Required result:
    col1        col2           col3
    1            Land1        Country1
    2            Land2        Country2
    or alternatively
    col1  col2      
    1            Land1      
    1            Country1
    2            Land2      
    2            Country2
    I tried extract-function
    select extract((XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))) , '/*/*/Id') as "xdata"
    from dual;
    xdata
    <Id>1</Id><Id>2</Id>
    and XMLTABLE (but how can I add the countries now)
    SELECT *
        FROM XMLTABLE('/*/*/Id'
               PASSING XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))
    COLUMN_VALUE
    <Id>1</Id>
    <Id>2</Id>
    DB version 11.2.0.3 on Windows 64bit
    Thanks,
    Tim

    Here are a few examples.
    For your required output :
    SELECT *
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'NlTexts/Name[1]'
                 , col3 varchar2(30) path 'NlTexts/Name[2]'
    or, if the Language attribute is significant :
    SELECT *
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'NlTexts/Name[@Language="de"]'
                 , col3 varchar2(30) path 'NlTexts/Name[@Language="en"]'
    For your alternate output :
    SELECT x1.col1
         , x2.col2
         --, x2.col3
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1  number  path 'Id'
                 , names xmltype path 'NlTexts/Name'
         ) x1
       , XMLTable(
           '/Name'
           passing x1.names
           columns col2 varchar2(30) path '.'
                 --, col3 for ordinality
         ) x2
    (uncomment col3 to see what it does)
    or, in a shorter way :
    SELECT *
    FROM XMLTable(
           'for $i in /MAS/Country
              , $j in $i/NlTexts/Name
            return element r { $i/Id, $j }'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'Name'

  • How to Read XML files in OC4J???

    I wrote a Web Application with JBuilder, and deployed it in OC4J.
    In the Web App, there were a class and a Jsp, following:
    in the class:(load the .xml file and get the element's attribute value)import org.jdom.Element;
    import org.jdom.Document;
    import org.jdom.input.SAXBuilder;
    public Document loadXMLDoc(String AFileName) throws Exception
    SAXBuilder lSAXBuilder = new SAXBuilder(false);
    Document lDoc = lSAXBuilder.build(AFileName);
    return lDoc;
    public void testGetXMLValue(String AFileName)
    throws Exception
    Document lDoc = null;
    Element lElement = null;
    Element lElement1 = null;
    try
    lDoc = loadXMLDoc(AFileName);
    lElement = lDoc.getRootElement().getChild("client-setup.xml");
    lElement1 = lElement.getChild("connection-params");
    catch (Exception e)
    e.printStackTrace();
    throw new Exception(lErrorStr);
    in the JSP:(invoking the class's method)<%
    testJspBeanId.testGetXMLValue("client-setup.xml");
    %>
    When compiling the Web App, I had contained the "jdom.jar" and "xerces.jar" packages in .ear file,
    After deploying the .ear in OC4J, the two packages in the "/applications/Web App/Web App/WEB-INF/lib/"
    but when I run the Web App to , Error took place:
    org.jdom.JDOMException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found:in deed:
    "Document lDoc = lSAXBuilder.build(AFileName);" bring on the error,
    but I can't resolve it and I am needing your help!!!
    Thank you.

    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.io.SAXReader;
    import java.io.File;
    import java.text.AttributedCharacterIterator.Attribute;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class XmlParser
    private String Result="";
    private String Final="";
    private String Delim="";
    public void bar1(Document document) throws DocumentException
    org.dom4j.Element root = document.getRootElement();
    // System.out.println(root.getName());
    bar2(root);
    System.out.println(this.Result);
    process();
    public void bar2(org.dom4j.Element e)
    for(Iterator i = e.elementIterator();i.hasNext();)
    org.dom4j.Element Element = (org.dom4j.Element) i.next();
    Result += Element.getName()+"\t"+Element.getText()+"\n";
    bar2(Element);
    public void process()
    StringTokenizer Tokenizer = new StringTokenizer(this.Result,"\n");
    String element;
    while(Tokenizer.hasMoreTokens())
    element = Tokenizer.nextToken();
    StringTokenizer Tokenizer2 = new StringTokenizer(element,"\t");
    // Do what ever String Process here Example
    this.Final += element.getName();
    this.Final += this.Delim;
    System.out.println(this.Final);
    public static void main(String s[])throws Exception
    Document document = null;
    SAXReader reader = new SAXReader();
    File f1= new File("D:/Rajesh/EDI to XML/EDI.xml");
    document = reader.read(f1);
    Demo obj = new Demo();
    obj.bar1(document);
    i think this will hep full.......

Maybe you are looking for

  • Changing Colour of only selected cells in MS excel..??

    Hi, I read in SAP Help that it is possible to change formatting (colour, border etc) for few cells using style sheets, so after doing the required changes and storing it under new style name when I press SAVE on screen 3 of layout builder it changes

  • How can I pass the gt_outtab for cl_salv_table via a form parameter?

    Hello, I have put everything displaying the alv into a form routine and want to pass the gt_outtab-table, which contains the data to be displayed, as a table parameter. Then I receice the error CX_SY_DYN_CALL_ILLEGAL_TYPE regardless if it is a typed

  • Creating Custom Mail Folders

    Is there a way to add folders to personalize/categorize mail by a specific folder, i.e., work, Joe-Bob? Thank you.

  • How To Change Root Folder Reference for href - anythingslider links?

    How To Change Root Folder reference for href - anythingslider links? My root folder in Web Apps>Carousel in admin is set at /carousel/ (http://bestinscotland04.businesscatalyst.com/carousel/slide-2 - as an example) but I want it to link to a specific

  • Advice on how to design this style of icons

    I am very new to AI and want to develop some icons for Android OS (Please see the image below as an example of what I am referring to). It seems they all have a similar style -- simple, clean, drop shadows around the icon, and linear gradients. 1. Ar