简体   繁体   中英

XML indentation characters (xmllint)

I recently installed xmllint in windows using this instructions . However when I run xmllint against any xml file it adds double quotes at the beginning of the line. Example

<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
<class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
 <description>This is a triangle plugin.</description>
</class>
</library>

becomes

<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
"  " <class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
"  " "  " <description>This is a triangle plugin.</description>
"  " </class>
</library>

I have played with several definitions of XMLLINT_INDET with the windows environmental variables tool. But nothing happens.

Do these double quotes are legal in XML?

No, these quotes are not XML standard . The problem was my linter manager (ALE) in my editor (vim). It sets up the XMLLINT_INDENT variable to textually " ". That is a bug in ALE. Then xmllint place these characters. I proposed a fix for that error in this pull request ,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM