473,581 Members | 2,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check and Validation by using parsing

35 New Member
hello everyone,
i am new in this community. i have some problem in checking and validation of data acording to syntax. which i have given below..
my problem is i want to check a sip url acording to syntax.i want to parse a url and check and validate . if url doesn't match with our syntax give error like url doesn't match....

Syntax:

SIP-URI = "sip:" [ userinfo ] hostport uri-parameters

Rule:
1. userinfo = ( user / telephone-subscriber )
examples:
sip:alice@atlan ta.com
sip:alice:secre tword@atlanta.c om;transport=tc p
sip:+1-212-555-1212:1234@gatew ay.com;user=pho ne

2. hostport = host [ ":" port ]
examples:
sip:alice@atlan ta.com
sip:alice:secre tword@atlanta.c om;transport=tc p
sip:+1-212-555-1212:1234@gatew ay.com;user=pho ne

3. uri-parameters = *( ";" uri-parameter )
examples:
sip:alice:secre tword@atlanta.c om;transport=tc p
sip:+1-212-555-1212:1234@gatew ay.com;user=pho ne
uri-parameter = transport-param / user-param
1. transport-param = "transport= " ( "udp" / "tcp" / "sctp" / "tls" / "tls-sctp" )
2. user-param = "user=" ( "phone" )
Jun 6 '07 #1
5 2467
miller
1,089 Recognized Expert Top Contributor
What have you tried so far?

- Miller
Jun 6 '07 #2
lokeshrajoria
35 New Member
What have you tried so far?

- Miller
Hello Miller,
i haven't tried so far...but, i am trying to solve this problem because i have no idea about parsing technique. how to parse data and check.. so now i learning parsing. if you have some tips about this probem and parsing. please do some needfull..
Jun 7 '07 #3
miller
1,089 Recognized Expert Top Contributor
The standard method used for most parsing is regular expressions. I suggest that you start with this book on perl. Chapter 5 covers regular expressions:

http://www.perl.org/books/beginning-perl/

After that there is more detailed documentation located on perldoc.

perldoc perlrequick
perldoc perlre
perldoc perlretut

Good luck,
- Miller
Jun 7 '07 #4
lokeshrajoria
35 New Member
Thank's Miller....

thanks and regards
Lokesh....
Jun 8 '07 #5
miller
1,089 Recognized Expert Top Contributor
Your Welcome Lokesh....

Miller....
Jun 8 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1764
by: Ewan B | last post by:
Hi, I'm using Xerces to parse XML files using SAX2, and am wondering if there is any information as to what exceptions are being thrown when certain validation errors occur. Taking a simple example schema <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
2
4653
by: Olaf Meyer | last post by:
Apprentently xerces 2.6.0 (Java) does not validate against contraints specified in the schema (e.g. constraints specified via unique element). The validation works with the XML editor I'm using (XMLSpy4) but not with Xerces 2.6.0. I've included a really short and simple example to illustrate it. I would like to get some comments on the...
1
1506
by: Ghee | last post by:
Hello, I have a (java) DOM object that adheres to an XML schema. I want to manipulate it in code, but to ensure that the object still sticks to the schema (ie, validation during the life-cycle of the DOM object, not just upon initial parsing). Is this possible? My investigation so far has revealed that DOM3 does provide validation...
8
5392
by: tshad | last post by:
I get the following message from one of my buttons where I have CauseValidation=false. Page.IsValid cannot be called before validation has taken place In my routine I need to do: if Not IsValid then exit sub end if
3
6310
by: ferg | last post by:
I have a Customer table. The table has two different CHECK constraints. Then there is the Customer details dialog, which provides the user with an UI for changing users. I have some UPDATE sql, which is called once the user clicks the OK button on this dialog. try { int rows = cmd.ExecuteNonQuery(); } catch(SqlException se)
7
10275
by: christian.eickhoff | last post by:
Hi Everyone, I am currently implementing an XercesDOMParser to parse an XML file and to validate this file against its XSD Schema file which are both located on my local HD drive. For this purpose I set the corresponding XercesDOMParser feature as shown in the upcoming subsection of my code. As far as I understand, the parsing process...
2
6732
by: John Smith | last post by:
Hello, I have a VB.NET application with a Windows form that have several textboxes fields where I have dates entered. I would like to do a date validation check after the the field is updated, so I' using the leave event. Right now I am creating a 'leave' sub for each of the fields. However, I'd like to simplify that and just call the name...
1
4294
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in Linux there is an error. The code that fails is the following: SchemaFactory factory = ...
0
2472
by: xavierite | last post by:
I am using this method to insert into table of xmltype INSERT INTO xml_table VALUES (XMLType(bfilename('XMLDIR','Test_xml.xml'), nls_charset_id('AL32UTF8'))); xmlfile is like this <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd"><metadata> <idinfo>
0
7882
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7808
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5683
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.