Parsing XML string

Let's say I have a simple XML string such like this:

String xmlString = "<xml ...><root><child attribute='value' /></root>";

How can I parse this string using intellij.util.xml package classes? I would like (for example) get the child's attribute value. How can I do this?

0

Hello Wojtek,

The classes in the com.intellij.util.xml package are not designed for parsing
simple XML strings. You can accomplish your task far easier using the JDOM
library which is bundled with IntelliJ IDEA.

Let's say I have a simple XML string such like this:

String xmlString = "<xml ...><root><child attribute='value'
/></root>";

How can I parse this string using intellij.util.xml package classes? I
would like (for example) get the child's attribute value. How can I do
this?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Ok, thanks for fast answer. :)

0

请先登录再写评论。