Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2004, 04:29 PM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default change values XML with DOM

Hi to all!

I am new with XML, and I need to write a C# program that reads an standalone XML document and change values in any elements on it, using DOM.

I am looking in the DOM documentation, but I am getting mad... Anybody knows what object & functions I must use?

Thanks to all!

-------------------------------
World only exists into your mind.
 
Old February 6th, 2004, 05:12 PM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

With the next line (XML) in the source:

<factura numero="000001/12" fecha="10/02/2004">

I perform these operations (right):

myElement= doc.DocumentElement;
attrColl = myElement.Attributes;

attr = attrColl["numero"];
sNumero = attr.InnerXml;

But, if I whant to read the next elements?

<factura numero="000001/12" fecha="10/02/2004">
  <cabecera>
<emisor cif="19.333.000-L">
      <nombre>Quesos Olorosos, Inc.</nombre>
      <direccion>Camembert, 113</direccion>
      <cpostal>18999</cpostal>
      <poblacion>Guadalarrapa</poblacion>
      <provincia>Ochata</provincia>
      <porc_iva>16</porc_iva>
    </emisor>


-------------------------------
World only exists into your mind.





Similar Threads
Thread Thread Starter Forum Replies Last Post
DOM Attribute name/values BrendonMelville XML 2 February 15th, 2006 06:05 PM
Parsing xml using DOM balarkavelidi XML 1 January 31st, 2006 10:28 PM
Loop in XML DOM? omallec XML 3 November 27th, 2003 09:16 AM
XML DOM with JScript --- PLEASE HELP!!! bebe XML 4 October 1st, 2003 11:40 AM
XML DOM and Javascript lilu XML 3 September 25th, 2003 07:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.