Parsing special characters between C and XML..


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Parsing special characters between C and XML..
# 1  
Old 05-10-2008
Parsing special characters between C and XML..

Hi,

I am getting problem in parsing special characters(Like &, > or <) in XML. I need to encode my C program and send in report format to another interface which is in XML format.
I do not know how to encode these special characters in C program before sending to XML format. Please help !!
# 2  
Old 05-10-2008
I think you'd need '&;lt' for < and '&;gt' for > or something like that. you should do a google search on 'html encoding' should be the same for xml.

Quote:
Originally Posted by ronix007
Hi,

I am getting problem in parsing special characters(Like &, > or <) in XML. I need to encode my C program and send in report format to another interface which is in XML format.
I do not know how to encode these special characters in C program before sending to XML format. Please help !!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

How to replace value of password tag in xml with blanks when special characters are there?

Hi All, I am trying to replace the values inside <password> tag in an xml file but it doesn't replace certain passwords: For eg: Server/home/sperinc>cat TextXML.txt <appIds> <entry name="AccountXref"> <type id="ldap"> <realm>nam</realm> ... (7 Replies)
Discussion started by: saroopkris85
7 Replies

2. Shell Programming and Scripting

Parsing a file containing special characters

I want to parse a file containing special characters, below is a sample content of file content of file : Serial_no:1$$@#first_name:Rahane$$@last_name:Ajiyenke@@#profession:cricketer!@#*&^ Serial_no:1$$@#first_name:Rahane$$@last_name:Ajiyenke@@#profession:cricketer!@#*&^... (3 Replies)
Discussion started by: rajMjar
3 Replies

3. Shell Programming and Scripting

Parsing special characters from variable commands

Hi, I am fairly new to unix scripting and recently tasked with some reporting scripts. The reporting checks several batch jobs and this is quite iterative. Now I am trying to minimize script effort and maximize reusability as there are only slight nuances in the repetitive tasks. For... (3 Replies)
Discussion started by: joeniks
3 Replies

4. Shell Programming and Scripting

Find out special characters from xml file

Hi....I have a xml file which is having lots of special characters which I need to find out and put the distinct list of those into a text file. The list of special characters is not specific, it can be anything at different point of time. Can anyone help me to find out the same and list out? ... (10 Replies)
Discussion started by: Krishanu Saha
10 Replies

5. Shell Programming and Scripting

XML: parsing of the Google contacts XML file

I am trying to parse the XML Google contact file using tools like xmllint and I even dived into the XSL Style Sheets using xsltproc but I get nowhere. I can not supply any sample file as it contains private data but you can download your own contacts using this script: #!/bin/sh # imports... (9 Replies)
Discussion started by: ripat
9 Replies

6. AIX

special characters in front of xml declaration

Hi I read xml files through mq and placed them on unix by using datastage as tool. I can see some special characters infront of declaration part for every xml file i have produced. below is the sample snippet when i opened the file by suing vi editor ^Z^E|^A^Z^Z<?xml version="1.0"... (1 Reply)
Discussion started by: dsdev_123
1 Replies

7. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

8. Shell Programming and Scripting

Sed special parsing

What is the shortest & right way to remove the string "" with a sed statement ? echo 'whateverwhatever' | sed ........ ? :) (2 Replies)
Discussion started by: ctsgnb
2 Replies

9. Shell Programming and Scripting

Special characters

When I open a file in vi, I see the following characters: \302\240 Can someone explain what these characters mean. Is it ASCII format? I need to trim those characters from a file. I am doing the following: tr -d '\302\240' ---------- Post updated at 08:35 PM ---------- Previous... (1 Reply)
Discussion started by: sid1982
1 Replies

10. UNIX for Dummies Questions & Answers

special characters

I have one file which is named ^? ( the DEL character ) I'd like to know how to rename or copy the file by using its i-node number TYIA (2 Replies)
Discussion started by: nawnaw
2 Replies
Login or Register to Ask a Question