xmllint(1) xmllint Manual xmllint(1) NNAAMMEE xmllint - command line XML tool SSYYNNOOPPSSIISS xxmmlllliinntt [----vveerrssiioonn | ----ddeebbuugg | ----sshheellll | ----ddeebbuuggeenntt | ----ccooppyy | ----rreeccoovveerr | ----nnooeenntt | ----nnoooouutt | ----hhttmmlloouutt | ----nnoowwrraapp | ----vvaalliidd | ----ppoossttvvaalliidd | ----ddttddvvaalliidd _U_R_L | ----ttiimmiinngg | ----rreeppeeaatt | ----iinnsseerrtt | ----ccoommpprreessss | ----ssggmmll | ----hhttmmll | ----ppuusshh | ----mmeemmoorryy | ----nnoowwaarrnniinngg | ----nnoobbllaannkkss | ----ffoorrmmaatt | ----tteessttIIOO | ----eennccooddee _e_n_c_o_d_i_n_g | ----ccaattaallooggss | ----nnooccaattaallooggss | ----aauuttoo | ----xxiinncclluuddee | ----llooaaddddttdd | ----ddttddaattttrr | ----ddrrooppddttdd] [_x_m_l_f_i_l_e] IINNTTRROODDUUCCTTIIOONN The xmllint program parses one or more XML files, speci- fied on the command line as _x_m_l_f_i_l_e. It prints various types of output, depending upon the options selected. It is useful for detecting errors both in XML code and in the XML parser itself. It is included in libxml2. OOPPTTIIOONNSS ----vveerrssiioonn Display the version of libxml2 used. ----ddeebbuugg Parse a file and output an annotated tree of the in-memory version of the document. ----sshheellll Run a navigating shell. Details on available com- mands in shell mode are below. ----ddeebbuuggeenntt Debug the entities defined in the document. ----ccooppyy Test the internal copy implementation. ----rreeccoovveerr Output any parsable portions of an invalid docu- ment. ----nnooeenntt Substitute entity values for entity references. By default, xmllint leaves entity references in place. ----nnoooouutt Suppress output. By default, xmllint outputs the result tree. ----hhttmmlloouutt Output results as an HTML file. This causes xmllint to output the necessary HTML tags surrounding the result tree output so the results can be displayed in a browser. ----nnoowwrraapp Do not output HTML doc wrapper. ----vvaalliidd Determine if the document is a valid instance of the included Document Type Definition (DTD). A DTD to be validated against also can be specified at the command line using the ----ddttddvvaalliidd option. By default, xmllint also checks to determine if the document is well-formed. ----ppoossttvvaalliidd Validate after parsing is completed. ----ddttddvvaalliidd _U_R_L Use the DTD specified by _U_R_L for validation. ----ttiimmiinngg Output information about the time it takes xmllint to perform the various steps. ----rreeppeeaatt Repeat 100 times, for timing or profiling. ----iinnsseerrtt Test for valid insertions. ----ccoommpprreessss Turn on gzip compression of output. ----ssggmmll Use the DocBook SGML parser. This allows documents written in SGML DocBook to be converted into an in- memory tree and treated as if they were written in XML. ----hhttmmll Use the HTML parser. ----ppuusshh Use the push mode of the parser. ----mmeemmoorryy Parse from memory. ----nnoowwaarrnniinngg Do not emit warnings from the parser and/or valida- tor. ----nnoobbllaannkkss Drop ignorable blank spaces. ----ffoorrmmaatt Reformat and reindent the output. ----tteessttIIOO Test user input/output support. ----eennccooddee _e_n_c_o_d_i_n_g Output in the given encoding. ----ccaattaallooggss Use the catalogs from $SGML_CATALOG_FILES. Other- wise /etc/xml/catalog is used by default. ----nnooccaattaallooggss Do not use any catalogs. ----aauuttoo Generate a small document for testing purposes. ----xxiinncclluuddee Do XInclude processing. ----llooaaddddttdd Fetch external DTD. ----ddttddaattttrr Fetch external DTD and populate the tree with inherited attributes. ----ddrrooppddttdd Remove DTD from output. SSHHEELLLL xmllint offers an interactive shell mode invoked with the ----sshheellll command. Available commands in shell mode include: bbaassee display XML base of the node bbyyee leave shell ccaatt _n_o_d_e Display node if given or current node. ccdd _p_a_t_h Change the current node to _p_a_t_h (if given and unique) or root if no argument given. ddiirr _p_a_t_h Dumps information about the node (namespace, attributes, content). dduu _p_a_t_h Show the structure of the subtree under path or the current node. eexxiitt Leave the shell. hheellpp Show this help. ffrreeee Display memory usage. llooaadd _n_a_m_e Load a new document with the given name. llss _p_a_t_h List contents of _p_a_t_h (if given) or the current directory. ppwwdd Display the path to the current node. qquuiitt Leave the shell. ssaavvee _n_a_m_e Saves the current document to _n_a_m_e if given or to the original name. vvaalliiddaattee Check the document for error. wwrriittee _n_a_m_e Write the current node to the given filename. AAUUTTHHOORR Copyright 2001 John Fleck Ziying Sherwin Heiko Rupp This is release 0.2 of the xmllint Manual. xmllint(1)