Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example Analysis of XML's attempt to add, delete, check and modify a XML document

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you XML attempts to add, delete, check and modify a XML document for example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

Corresponding program: project:TestDoProject

Corresponding program: javaWeb day01

1. Learn to program a project in modules: this program is divided into four modules: dao, doMain, tool, view

Dao: what is stored in this package is the tiredness of directly manipulating files. The main method can call the methods in this package to manipulate XML documents.

DoMain: this package is the constructor package

Tool: this package is a toolkit. Write the tool classes you want to use and put them in this package for easy program calls without having to type the code every time you use it.

View: this package contains interface classes for dealing with users, and the main class is here.

2. What is often used in this program:

Document has many ways to modify documents easily.

Element tag

Attribute attribute

3. Problems encountered:

When the design is deleted, an error is reported because the changes are not written into the document at the end

In the design lookup, because exam_id is an attribute and my name is a tag, I use attribute to prompt null pointer exception in the video.

In the design search, due to accidentally added after the for ";" plus "{}" position error prompt null pointer exception, debugging for a long time.

4. When solving a problem, sometimes check whether the program syntax or structure is wrong, and solve the small problem first.

The above is all the contents of this article "XML attempts to add, delete, check and modify a XML document". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report