xml dom node children
Posted
by matt
on Stack Overflow
See other posts from Stack Overflow
or by matt
Published on 2010-03-20T13:53:32Z
Indexed on
2010/03/20
14:01 UTC
Read the original article
Hit count: 298
Xml
Need some help I've got lots of code and i want to make it shorter i know there's a way but I can't remember it this is code example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title lang="en">XQuery Kick Start</title>
<author>James McGovern</author>
<author>Per Bothner</author>
<author>Kurt Cagle</author>
<author>James Linn</author>
<author>Vaidyanathan Nagarajan</author>
<year>2003</year>
<price>49.99</price>
</book>
<book category="web" cover="paperback">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore
As you can see the different nodes, children now is there a way to make this code smaller so I don't have to keep writing the nodes and children
© Stack Overflow or respective owner