| |

VerySource

 Forgot password?
 Register
Search
View: 748|Reply: 3

Parsing Struts-like XML

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-5 00:30:01
| Show all posts |Read mode
I want to parse the XML similar to the struts configuration file, for example there is such a configuration there:
<action
      name = "analysisForm"
      path = "/ worklogAnalysis"
      scope = "request"
      type = "org.springframework.web.struts.DelegatingActionProxy" />
But what do I need to do to get the value of name? I can either get all the paragraphs. Or I can only get the action. When I write, I also want to write it like this. I do n’t want to write the standard <action> <name > aaa </ name> </ action>
May I ask what tools can achieve this approach? Any tool can do it, but it is best to give priority to efficiency. For example, using JDOM to parse a 20K STRUTS configuration file, the slowest time is actually 12 seconds. Khan ...
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-19 20:00:01
| Show all posts
You can write a parser yourself
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

 Author| Post time: 2020-8-1 18:15:01
| Show all posts
Can no expert answer it?
Reply

Use magic Report

1

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-8-19 11:15:01
| Show all posts
dom4j, it's easy to use
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