Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I Read -> Modify -> Write an XML Document

    I have an XML Document that I want to read in, then add a few tags, values and attributes then Output it as a modified XML. How would I get this accomplised. Do you have any suggested methods or Libraries. I am a java programmer but can use practically any language[xcept Msoft tools].

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Which application would be doing this? A web browser? A server-side script? Some other source?

    What's the original source look like? What would you be adding, and where? Where's the output going (to a web browser, to an e-mail address...)

    We need many more details before we can really help.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    example

    Quote Originally Posted by Alex Vincent View Post
    Which application would be doing this? A web browser? A server-side script? Some other source?
    I said I know java, so a regular desktop application would do. I also know php, so the it doesnt matter I just want the problem solved.
    Quote Originally Posted by Alex Vincent View Post
    What's the original source look like? What would you be adding, and where?
    excerpt code below. I will be adding the path tag and the ID attributes in some of the tags.

    Code:
    <store id="1">
    - <products>
    - <product id="2">
    - <categories>
    - <category id="3">
      <description /> 
      <id>430</id> 
      <name /> 
      <parent /> 
      </category>
      </categories>
      <cost>121.49</cost> 
      <description>510 g (18 OZ)</description> 
      <id>0</id> 
    - <image id="4">
      <path>/home/epocolis/Desktop/downloads/Completed/no_pic.jpg</path> 
      </image>
      <imagePath /> 
      <listPrice>0.00</listPrice> 
      <model>11224P</model> 
      <name /> 
      <sellPrice>151.21</sellPrice> 
      <type>product</type> 
      <unique_hash>3935b9d1465fdf5ec5233659c1bb303e</unique_hash> 
      <weight>0</weight> 
      </product>
    Where's the output going (to a web browser, to an e-mail address...)
    The output is going to another [edited] XML file - thats it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •