LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   XMLLINT problem (https://www.linuxquestions.org/questions/linux-server-73/xmllint-problem-4175493956/)

sashi_hc 02-06-2014 12:14 PM

XMLLINT problem
 
I have an XML file that look like this - let us call it decision.xml

<Decision>
<DecisionValWrapper>
<DecisionKey>RuleName</DecisionKey>
<DecisionVal>MyDomain:My program:Long name of decision about 50 characters:My view:My version</DecisionVal>
<DecisionType>String</DecisionType>
</DecisionValWrapper>
<Decision>

Now when I say grep (without any arguments) inside the shell of xmllint, it outputs a shortened form of the DecisionVal contents.

What should I do to get the entire contents? I have used --huge option, and also the --nocompact option

ie -> xmllint -shell --huge --nocompact decision.xml
followed by grep

pingwinowiewc 02-07-2014 12:01 PM

grep does not work correctly with XML's
how about switching to Sanjo's bgrep? its grep but with support for xml/php/cgi and so on.....
should be available in testing repo....


All times are GMT -5. The time now is 09:20 AM.