| |

VerySource

 Forgot password?
 Register
Search
View: 835|Reply: 8

A question about XML

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-2-1 21:20:01
| Show all posts |Read mode
Can I modify the XML element name (without deleting and rebuilding), and how to modify it if possible, please experts
Reply

Use magic Report

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-17 15:15:01
| Show all posts
What is the name of the element? Element? Did you modify it to verify the past?
Reply

Use magic Report

0

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-17 21:15:01
| Show all posts
Can be modified
Read sequentially with the children of the parent node
Reply

Use magic Report

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-19 20:45:01
| Show all posts
Don't tell me your XML file doesn't have XSD structure validation
Individual files can of course be modified
XMLDocument can be read and modified in C #
Use DATASET to read it out, and then write it back to change it (in fact, serialization)
XMLTextWriter
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-4-23 15:00:01
| Show all posts
Sorry, I thought the problem was clear, like this:
    There is an element <node1> sdf </ node1>, can you change node1 to node2, because the attribute name of the element is read-only
, So I do n’t know what other ways to modify besides deleting and redoing

The younger brother or the student is working on a project, this is a windows application, the younger brother does not know XML well, please master help
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2020-4-25 21:15:01
| Show all posts
There seems to be no better way ...
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 United States

 Author| Post time: 2020-5-27 20:00:01
| Show all posts
Is there really only way to delete and redo
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-6-2 19:45:02
| Show all posts
lz:
   You can be told clearly, (without deleting the reconstruction, or manually editing), the name of the node element cannot be changed dynamically. This is like opening a database table, it will never be allowed to modify the name of the field while opening the table. In fact, for any data structure, such as structure, class, when used in memory, it is not allowed to modify the names of its members. If you think about it, getting information depends on these structural fields. If you modify it during use, will the memory not be messed up?
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-12 21:00:01
| Show all posts
Thanks ls
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list