What is the output format of xmllint ls?

Using xmllint --shell, I do

chapter > cat * 
 -------
<title>Getting to Know Penguins</title>
 -------
<abstract>
      <para>Penguins are cute.</para>
    </abstract>
 -------
<sect1>
      <title>The Head</title>
      <para>...</para>
    </sect1>
 -------
<sect1 id="penguin.coat">
      <title>The Coat</title>
      <para>...</para>
    </sect1>

and

chapter > ls
ta-        5      
---        1 title
ta-        5      
---        3 abstract
ta-        5      
---        5 sect1
ta-        5      
c--       17 
ta-        5      
-a-        5 sect1
ta-        3  

What do ta, c, and a mean, and what do the characters represent?

+5
source share
1 answer

The answer you are looking for is available in the following place:

libxml2-2.9.0 :: debugXML.c: 1652: xmlLsOneNode (FILE * output, xmlNodePtr node)

node, , "-" . node , XML_NAMESPACE_DECL, "a", node → NULL, "n", node → nsDef NULL. , # N# , node , # CL # - node.

XML_ELEMENT_NODE:
---     #NC# [[(node->ns->prefix):](node->name)]

XML_ATTRIBUTE_NODE:
a--     #NC# [(node->name)]

XML_TEXT_NODE:
t--     #CL# [xmlDebugDumpString(node->content)...|"(NULL)"]
    * The string value of content up to at most 40 characters with some
    * substitutions.  A space (' ') replaces the whitespace characters
    * allowed by the XML RFC: (0x20, 0x9, 0xA, 0xD).  Any character whose
    * HEX value is 0x80 or greater is printed as a string: "#XXXX"


XML_CDATA_SECTION_NODE:
C--     #CL#

XML_ENTITY_REF_NODE:
e--     1 [(node->name)]

XML_ENTITY_NODE:
E--     1 [(node->name)]

XML_PI_NODE:
p--     #CL#

XML_COMMENT_NODE:
c--     #CL#

XML_DOCUMENT_NODE:
d--     #NC#

XML_HTML_DOCUMENT_NODE:
h--     #NC#

XML_DOCUMENT_TYPE_NODE:
T--     1

XML_DOCUMENT_FRAG_NODE:
F--     1

XML_NOTATION_NODE:
N--     1

XML_NAMESPACE_DECL:
n       1 [(node->prefix)|"default"] -> (node->href)

default:
?--     1
+2

All Articles