reading an xml file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dctm
    New Member
    • Sep 2007
    • 1

    reading an xml file

    hello
    i want to read an Xml file
    having the structure like


    <Object type="docment" path="c:\temp\f older1\document 1.doc" />
    <attribute name="author_na me" value="dmadmin" />
    </Object>
    <Object type="docment" path="c:\temp\f older2\document 2.doc" />
    <attribute name="author_na me" value="user1" />
    </Object>
    <Object type="docment" path="c:\temp\f older1\folder1. 1\document3.doc " />
    <attribute name="author_na me" value="user2" />
    </Object>

    m not able to get the values of attributes name and value

    can anybody pls help me out in this using java
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Have you read the API documentation for the SAXParser class?

    kind regards,

    Jos

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      Originally posted by dctm
      hello
      i want to read an Xml file
      having the structure like


      <Object type="docment" path="c:\temp\f older1\document 1.doc" />
      <attribute name="author_na me" value="dmadmin" />
      </Object>
      <Object type="docment" path="c:\temp\f older2\document 2.doc" />
      <attribute name="author_na me" value="user1" />
      </Object>
      <Object type="docment" path="c:\temp\f older1\folder1. 1\document3.doc " />
      <attribute name="author_na me" value="user2" />
      </Object>

      m not able to get the values of attributes name and value

      can anybody pls help me out in this using java
      Welcome to TSDN.
      There are two API groups in XML parsing.
      One is SAX and another one is JAXP.
      Try with this then come here with your specific problems, the experts are here to solve those problems.
      Good luck.

      Kind regards,
      Dmjpro.

      Comment

      Working...