Hello,
while I'm parsing a XML file (xmlreader) I must create an object (MYXML) that represent it; I was thinking something about this:
<xml>
<body>
<book>
<title> Hello </title>
</book>
</body>
<xml>
<xml>
<body>
<book>
<title> Hello </title>
</book>
</body>
<xml>
To copy to clipboard, switch view to plain text mode
class MYXML {
private Elementroot = new Element();
public MYXML() { }
public class Element {
String text;
List<Attribute> att = new List<Attribute>(); //can be empty
List<Element> childs = List<Element> (); //can be empty
}
public class Attribute {
String name = null;
String value = null;
}
}
class MYXML {
private Elementroot = new Element();
public MYXML() { }
public class Element {
String text;
List<Attribute> att = new List<Attribute>(); //can be empty
List<Element> childs = List<Element> (); //can be empty
}
public class Attribute {
String name = null;
String value = null;
}
}
To copy to clipboard, switch view to plain text mode
Can be fine? Do you know where can I find an example of this thing? I saw a QT class that implements exactly what I want to do but I can't find it.
thanks
Bookmarks