05-27-2011
Quote:
Originally Posted by
DGPickett
Well, usually we use the PERL sax parser modules not home brew! They call you as tags are opened and closed, so you can deal with attributes and content.
Make an array string variable I_AM_IN and a depth integer variable xml_depth to index it, and keep track of where you are. Use them in debug or error log messages, presented as: /$I_AM_IN[0]/$I_AM_IN[1] . . .
Hi,
Thanks for the reply.
Can u give a small code snippet it will be helpful to me.
Regards
Vanitha
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Discussion started by: girigopal
0 Replies
2. UNIX for Dummies Questions & Answers
Like the topic says, does anyone know if it is possible to check to see when an FTP only user has logged in? Because the shell is /bin/false and they are only using FTP to access the system doing a "finger" or "last" it says they have never logged in.
Is there a way to see when ftp users log in... (1 Reply)
Discussion started by: LordJezo
1 Replies
3. Shell Programming and Scripting
Hi,
I have to perform the two things;
a) Have to check the previous counter value in the file.
b) After some processess are runned again i have to check the same counter value in the same file.
Here is the file contents.
#File contents of file.txt
CounterValue: 0
Here is the... (2 Replies)
Discussion started by: vanitham
2 Replies
4. Shell Programming and Scripting
Hi,
I have 2 questions:
a) Does getElementsByTagName in xml takes more time?
b) If it takes more time what are the other alternatives used to get the tag names?
For example:
<Student>
<Studname>aaa</Studname>
<Studno>123</Studno>
</Student>
This is just a sample data. The file... (2 Replies)
Discussion started by: vanitham
2 Replies
5. Shell Programming and Scripting
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies
6. Shell Programming and Scripting
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies
7. Shell Programming and Scripting
I've got two different files and want to compare them.
File 1 :
HTML Code:
<response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies
8. Shell Programming and Scripting
I do have an xml sheet as below where I need the perl script to filter only the hyperlink tags.
<cols><col min="1" max="1" width="30.5703125" customWidth="1"/><col min="2" max="2" width="7.140625" bestFit="1" customWidth="1"/>
<col min="3" max="3" width="32.28515625" bestFit="1"... (3 Replies)
Discussion started by: scriptscript
3 Replies
9. Shell Programming and Scripting
Hi Everyone,
I'm new here and I was checking this old post:
/shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html
(cannot paste link because of lack of points)
I need to do something like this but understand very little of perl.
I also check... (4 Replies)
Discussion started by: mcosta
4 Replies
10. UNIX for Beginners Questions & Answers
I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies