Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 6th, 2004, 04:29 PM
Authorized User
 
Join Date: Nov 2003
Location: Mataro, Barcelona, Spain.
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.
Reply With Quote
  #2 (permalink)  
Old February 6th, 2004, 05:12 PM
Authorized User
 
Join Date: Nov 2003
Location: Mataro, Barcelona, Spain.
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.