[xml] xmllint -shell and namespaces?
- From: Artur Klauser <Artur Klauser computer org>
- To: xml gnome org
- Subject: [xml] xmllint -shell and namespaces?
- Date: Tue, 7 May 2002 17:15:58 -0400 (EDT)
I'm having a hard time to determine if this is a bug, or if I haven't
figured out what the right syntax is, but when I load any document with
(explicit or default) namespaces in xmllint shell, I can't cd to a
named node anymore. Following is an exampl:
-------------------------------------------------------------------
% xmllint -shell foo.xml
/ > cat
<?xml version="1.0"?>
<foo xmlns="http://a.com/foo">
<bar>
Hello World!
</bar>
</foo>
/ > ls
--n 3 foo
/ > cd /foo
/foo is a 0 Node Set
/ > xpath node()
Object is a Node Set :
Set contains 1 nodes:
1 ELEMENT foo
default namespace href=http://a.com/foo
/ > cd node()
foo > pwd
/(null):foo
-------------------------------------------------------------------
So, if "cd foo" does not work, what does? - other than anonymous
references like the above "cd node()".
BTW, I have similar problems if the namespace is explicit, ie. if all tags
are prefixed with say f: and I declare xmlns:f="http://a.com/foo" in the
document root element. Here, neither "cd foo" nor "cd f:foo" do the trick.
-r2r-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]