Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How to Processing XML data

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 04-03-2010
Member
 
Join Date: Feb 2010
Posts: 169
How to Processing XML data

Hi all,

I am using XML services. When i store data in XML file, i usually need to carefully in order to secure and easy way to make XML parser confusion encoded. Special XML markup characters need to be converted to a number of entities, if we personally write in a text editor XML, this requirement may be very troublesome. I want to know that how to avoid this trouble. Please advice. Please suggest.
Reply With Quote
  #2  
Old 04-03-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
How to Processing XML data

you can use the CDATA area to store data directly, without having to worry about encoding issues. By the XML is a widely supported Internet standard for encoding in a special way of structured data. In fact, XML-encoded data can be decoded by any programming language, one can even use a standard text editor to read or write XML data. Many applications, especially modern standards-compliant Web browser, you can deal directly with XML data. Check and reply.
Reply With Quote
  #3  
Old 04-03-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: How to Processing XML data

If you have ever tried some of the HTML or XML into an XML document (perhaps as documentation), then as long as you are trying to contain an example, we will encounter this problem. XML document, the text is usually resolved to character data, or (according to document type definition terminology) is called PCDATA. XML special characters (&, "and") in the PCDATA can be identified and used to resolve element names and entities. CDATA (character data) areas are parser as a data block, allowing you to contain any characters in the data stream. All the best.
Reply With Quote
  #4  
Old 04-03-2010
kelfro's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,976
How to Processing XML data

XML document, the text is usually resolved to character data, or according to document type definition terminology is called PCDATA. XML special characters (&, "and") in the PCDATA can be identified and used to resolve element names and entities. CDATA (character data) areas are parser as a data block, allowing you to contain any characters in the data stream. CDATA marked the beginning of the region is a special sequence of <! [CDATA [An end tag is ]]> Sequence. Anything between these tags will be intact through the XML parser. Check and reply.
Reply With Quote
  #5  
Old 04-03-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: How to Processing XML data

If you have already seen a number of Web pages with embedded JavaScript, then you also see the practical application of CDATA. XHTML elements in the CDATA of the <script>
Code:
<? xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type"
content = "application / xhtml + xml; charset = utf-8" />
<title> CDATA Section in Action </ title>
<script type="text/javascript">
/ / <! [CDATA [
function nowWeAreSafe (x, y, z) (
    / / Without the CDATA section, these would cause
    / / Parsing errors:
    if (x <y & & y> z) (
        return y -;
    )
    return 0;
)
/ /]] "
</ script>
</ head>
<body>
...
</ body>
</ html>
<script> JavaScript element that contains a CDATA region began in the beginning of the comment tag, ending in a closure of the CDATA comments area. This approach seems pointless, it will only make your XHTML, and JavaScript is more messy, unless you are aware of: there is no such CDATA area, your script through the Web browser running XHTML parser.
Check and reply.
Reply With Quote
  #6  
Old 04-03-2010
absolute55's Avatar
Member
 
Join Date: Nov 2005
Posts: 1,238
How to Processing XML data

There are also some limitation of CDATA that is the browser is usually not XML parser. The browser does not reliably deal with HTML or XHTML in the CDATA (if any). CDATA regions can appear anywhere in XHTML (as in any XML application does), but in practice, these CDATA areas are usually ignored. Either lost their contents (CDATA region disappeared from the normal DOM), or displayed as text and the tags with some free character. To see this effect, please check one page, which displays sample passages, with visible marks (using the entity) of the sample paragraphs and try to use CDATA shows a sample paragraph with a visible marking. Check and reply.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to Processing XML data"
Thread Thread Starter Forum Replies Last Post
cPanel 11.25 Log Processing Galimberti Software Development 4 17-06-2010 07:39 AM
How to protect remote processing Aashirya Networking & Security 5 12-03-2010 02:10 AM
digital image processing ahmadhm_1986 Technology & Internet 3 13-08-2009 08:57 AM
What is file processing system Amanat Windows Software 3 12-12-2008 06:10 PM
loopback processing Bobby Gontarski Active Directory 3 18-05-2007 04:50 PM


All times are GMT +5.5. The time now is 04:03 AM.