Symbian3/SDK/Source/GUID-42F0F282-58D6-4878-B53D-EAEEF86A3D7D.dita
changeset 7 51a74ef9ed63
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-42F0F282-58D6-4878-B53D-EAEEF86A3D7D.dita	Wed Mar 31 11:11:55 2010 +0100
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-42F0F282-58D6-4878-B53D-EAEEF86A3D7D" xml:lang="en"><title>Parsing
+Delimited Data</title><shortdesc>This tutorial describes the steps to parse delimited data. The
+data in the URI that is delimited into segments can be parsed using the <codeph>TDelimitedXxxxParser8</codeph> classes. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<prereq>       <p>Parse the delimited data using the following functionalities
+of <codeph>TDelimitedXxxxParser8</codeph>: <ul>
+<li><p>Set the delimiter (before parsing the data) to a specific character
+using <codeph>SetDelimiter()</codeph>. For example:</p><codeblock xml:space="preserve">//set the delimiter character to '/'
+SetDelimiter(TChar('/'));</codeblock></li>
+<li><p>Parse the data into segments from left to right using<codeph> Parse()</codeph>. </p></li>
+<li><p>Parse the data into segments from right to left using <codeph>ParseReverse()</codeph>.</p><note> Parse
+the data into segments before calling any of the functions described in the
+following steps.</note></li>
+<li><p>Parse to the next segment using <codeph>Inc()</codeph>. </p></li>
+<li><p>Get the descriptor reference with the data using <codeph>Des()</codeph>. </p></li>
+<li><p>Get the current segment and parse the data to the next segment using <codeph>GetNext()</codeph>. </p></li>
+<li><p>Get the current segment using <codeph>Peek()</codeph>. </p></li>
+<li><p>Get the remaining data from (and including) the current segment using <codeph>Remainder()</codeph>. </p></li>
+</ul></p>     </prereq>
+<context>       <p><codeph>TDelimitedXxxxParser8</codeph> classes provide
+functionalities to parse delimited data, extract the current segment and parse
+the string for the next segment. </p><p>Use the class derived from <xref href="GUID-B647B6DA-5FF1-3C11-9ACD-E4A5E70F3596.dita"><apiname>TDelimitedParserBase8</apiname></xref> for
+implementing the function provided by <codeph>TDelimitedXxxxParser8</codeph>. </p><p>The
+following three classes are used to parse the respective URI components: </p> 
+   </context>
+<steps-unordered>
+<step id="GUID-7DE23814-1B2C-4B07-84EB-53D80D3EBBFE"><cmd/>
+<info><p><xref href="GUID-CD78AD53-FD6C-397A-9930-12E8EDCF6040.dita"><apiname>TDelimitedPathParser8</apiname></xref> for parsing path into directories
+separated by '/'. For example: <filepath>/doc_source/guide/N10047/index.html</filepath>.</p></info>
+</step>
+<step id="GUID-7DDA81B9-31D4-4DFA-A08D-5E42F10F4145"><cmd/>
+<info><p><xref href="GUID-F55AF53B-662F-3682-9B6D-A3D14AED0D58.dita"><apiname>TDelimitedPathSegmentParser8</apiname></xref> for parsing parameters
+that are separated by ';' For example: <codeph>postd=pp22;isub=1411@foo.com;user=phone</codeph>. </p></info>
+</step>
+<step id="GUID-84D83684-E711-4728-99A9-ED1EDD826F80"><cmd/>
+<info><p><xref href="GUID-F76F2546-D3AC-341B-BED8-D3C88EA2C018.dita"><apiname>TDelimitedQueryParser8</apiname></xref> for parsing the query string
+(after a '?') into name/value pairs that is separated by '&amp;'. For example: <codeph>sortcol=4&amp;table=1&amp;up=0&amp;view=details</codeph></p></info>
+<info><p>The following table shows the delimiter to be used to separate each
+of the URI components:</p><table id="GUID-9A8DAC25-B8B8-42D1-94E8-39DAEFA16DBF">
+<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
+<tbody>
+<row>
+<entry><p><b>URI Component</b></p></entry>
+<entry><p><b>Delimiter</b></p></entry>
+</row>
+<row>
+<entry><p>Path </p></entry>
+<entry><p>/</p></entry>
+</row>
+<row>
+<entry><p>Path segment </p></entry>
+<entry><p>;</p></entry>
+</row>
+<row>
+<entry><p>Query </p></entry>
+<entry><p>&amp;</p></entry>
+</row>
+</tbody>
+</tgroup>
+</table></info>
+</step>
+</steps-unordered>
+</taskbody><related-links>
+<link href="GUID-795B41AF-FBEA-56CE-AE20-EF17BE754723.dita"><linktext>HTTP Utilities
+Library Overview</linktext></link>
+</related-links></task>
\ No newline at end of file