On 10/26/2014 5:59 AM, Pierre Labastie wrote:
Le 26/10/2014 03:18, Bruce Dubbs a écrit :
Alan Feuerbacher wrote:
On 10/25/2014 9:16 PM, Bruce Dubbs wrote:
Simon Geard wrote:
On Sat, 2014-10-25 at 17:58 -0400, Alan Feuerbacher wrote:
I'm wondering if using this tool is the right way to test XML code. Do
you LFS guys have any suggestions?

What do you mean "test" XML code?

About the only thing I know is xmllint.

Ok, I see I have quite a bit more reading to do. :-)

Actually XML is fairly easy.  It's just tags and attributes.  The problem is
that it's meaningless without a DTD (for example DocBook) and creating that is
definitely non-trivial.

If you have a published DTD, then you can use xml tools like xmllint and
xsltproc to actually do something.  There are other ways to parse xml too.  In
Qt, they have a class that will parse xml and you can do something with that.

The question is whether you have a tool for verifying well-formedness and to
validate. Since I do not know the tool your book is referencing, I cannot tell
how to replace it. If you are not reluctant to use command line, xmllint is a
good tool, for both type of verifications. As an editor, vim is good at
highlighting XML code.

This afternoon I played around with these things to get my feet wet.

Now, what you should be aware of is that the hard part is outside XML: it is
in the purpose of the XML document itself. As you know, XHTML, HTML5 and
docbook documents are XML documents, but with a completely different set of
rules when it comes to use them. And XML can be used for completely different
purposes: small databases, configuration files (see the D-Bus configuration in
the book), and so on.

I had no idea that such a variety of things were based on XML, or how it all works together. I have a much better idea now.

I find it somewhat odd that whoever programmed D-Bus decided upon XML as the basis for its configuration files. Wouldn't plain text, as so many other software packages use, have been easier? Or is there some advantage that XML gives?

Alan

--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to