[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum moderator: shanky, Piyu, Resh  
Forum » Open System-Linux » Linux System questionare » What is xmlwf command?
What is xmlwf command?
PiyuDate: Friday, 2014-04-11, 2:02 PM | Message # 1
Private
Group: Users
Messages: 10
Awards: 0
Reputation: 21
Status: Offline
What is xmlwf command?Plz explain
 
shankyDate: Friday, 2014-04-11, 3:26 PM | Message # 2
Lieutenant
Group: Administrators
Messages: 46
Awards: 0
Reputation: 104
Status: Offline
Hi again tongue
 
       xmlwf - Determines if an XML document is well-formed
FORMAT
       xmlwf  [  -s]   [ -n]  [ -p]  [ -x]  [ -e encoding]  [ -w]  [ -d output-dir]  [ -c]  [ -m]  [ -r]  [ -t]  [ -v]  [ file ...]

DESCRIPTION
       xmlwf uses the Expat library to determine if an XML document is well-formed.  It is non-validating.
       If you do not specify any files on the command-line, and you have a recent version of xmlwf, the  input  file  will  be
       read from standard input.

Rules for a WELL-FORMED DOCUMENT
       A well-formed document must adhere to the following rules:
       · The file begins with an XML declaration.  For instance, <?xml version="1.0" standalone="yes"?>.  NOTE: xmlwf does not
         currently check for a valid XML declaration.
       · Every start tag is either empty (<tag/>) or has a corresponding end tag.
       · There is exactly one root element.  This element must contain all other elements in  the  document.   Only  comments,
         white space, and processing instructions may come after the close of the root element.
       · All elements nest properly.
       · All attribute values are enclosed in quotes (either single or double).
       If  the  document has a DTD, and it strictly complies with that DTD, then the document is also considered valid.  xmlwf
       is a non-validating parser -- it does not check the DTD.  However, it  does  support  external  entities  (see  the  -x
       option).

So xmlwf checks for all such rules and determine if the xml file is well formed.
Example: Below file is not having XML declaration: <?xml
 
Prompt:>xmlwf 140408_180157_L1007_M_6403_1_1.xml
140408_180157_L1007_M_6403_1_1.xml:1:8: not well-formed (invalid token)


To open a XML file to be well visible you can use:
xmllint --format xmlfile
 
For more info on xmlwf, you can see man page of xmlwf
Hope this will be useful. biggrin


s.k.bhagat
 
PiyuDate: Friday, 2014-04-11, 4:07 PM | Message # 3
Private
Group: Users
Messages: 10
Awards: 0
Reputation: 21
Status: Offline
Thanks Shanky. It was very helpfull for my Reverse KT, though i forget to explain this.:P
 
Forum » Open System-Linux » Linux System questionare » What is xmlwf command?
  • Page 1 of 1
  • 1
Search: