newbie ques

M

Madhu Ramachandran

i want to look for xml tokens.. like <token> .. the pattern matching doesnt
seem to work when i have < and >.. i tried escaping < and > with a \ , but
no use..

$inp=<STDIN>;
if ($inp =~ /\b\<[a-z]+\>\b/) {
print ("SUCCESS inp has <sometoken> \n");
}

even if i enter <a> as input, i never get SUCCESS printed

Thanks in advance
 
P

Paul Lalli

Madhu said:
Subject: newbie ques

Please put the subject of your post in the Subject of your post. Your
post is not about newbie questions. Your post is about parsing text
which contains said:
i want to look for xml tokens.. like <token> .. the pattern matching doesnt
seem to work when i have < and >.. i tried escaping < and > with a \ , but
no use..

$inp=<STDIN>;
if ($inp =~ /\b\<[a-z]+\>\b/) {

What do you believe those \b markers are doing? I'm willing to bet
that's the root cause of your problem. \b matches a slot between a \w
character and a \W character. said:
would have to be \w characters (that is, letters, numbers, or underscores). Are they?
print ("SUCCESS inp has <sometoken> \n");
}

even if i enter <a> as input, i never get SUCCESS printed

Ah, so the thing before < is a beginning of string, and the thing after
is an end of string. Neither of those match \w characters. What made you think you wanted or needed to put \b tokens in there to begin with?

#!/usr/bin/perl
use strict;
use warnings;

if ('<a>' =~ /<[a-z]+>/){
print "(1) Match\n";
}

if ('<a>' =~ /\b<[a-z]+>\b/){
print "(2) Match\n";
}

__END__
(1) Match


Please note that for parsing XML-like data, you should not be using
regular expressions at all. Instead, use a module designed to parse
XML. Go to http://search.cpan.org and search for XML::parser and its
friends.

Paul Lalli
 
B

BZ

Madhu Ramachandran wrote in comp.lang.perl.misc:
i want to look for xml tokens.. like <token> .. the pattern matching doesnt
seem to work when i have < and >.. i tried escaping < and > with a \ , but
no use..
$inp=<STDIN>;
if ($inp =~ /\b\<[a-z]+\>\b/) {
print ("SUCCESS inp has <sometoken> \n");
}

That's because \< and \> match word boundaries, not < and >
characters.

You should know though, that xml parsing by means of regular
expressions can't be done (or at least, not very easily). You really
should be using a real XML parser.
 
M

Madhu Ramachandran

I apologize about the subject heading. changed it now and will keep that in
mind in my future posts.

1. About \b,
The book iam using says \b is a "Word-Boundary Pattern Anchor".
eg:
/\bdef/ matches def and and defghi, but will not match abcdef
and /\bdef\b/ will match exactly def, not abcdef or defghi

I was able to test the foll and it works..
when i tested $inp =~ /\bget[a-z]*lost\b/

only getlost or getAnyLetterHerelost works.. but agetlost or getlostb does
not work.. so i want to recognize tokens which start with < and end with >,
and ignore any embedded < or >
ie. match <token>, but dont match tok<en>

but can't seem to get it working with /\b<[a-z]+>\b/

2. Regarding not using standard xml parser.. That was my first aim. but
unfortunately iam using a load (OS) where i can't install any packages. its
long story.. cuz the disks used to install this load (is strictly monitored)
and comes with just perl, and they wont let me add any external modules to
the disk. These disks are the ones sent to customer and getting anything
added in there, would need to waddle thru lot of red tape. so, iam just
stuck with core modules of perl.

Iam just playing around to see if i can write my own simplistic xml parser
(non validating) in perl. Worst case i would just use a .properties file
with name value pairs instead of xml. :(
 
R

robic0

Madhu said:
I apologize about the subject heading. changed it now and will keep that in
mind in my future posts.

1. About \b,
The book iam using says \b is a "Word-Boundary Pattern Anchor".
eg:
/\bdef/ matches def and and defghi, but will not match abcdef
and /\bdef\b/ will match exactly def, not abcdef or defghi

I was able to test the foll and it works..
when i tested $inp =~ /\bget[a-z]*lost\b/

only getlost or getAnyLetterHerelost works.. but agetlost or getlostb does
not work.. so i want to recognize tokens which start with < and end with >,
and ignore any embedded < or >
ie. match <token>, but dont match tok<en>

but can't seem to get it working with /\b<[a-z]+>\b/

2. Regarding not using standard xml parser.. That was my first aim. but
unfortunately iam using a load (OS) where i can't install any packages. its
long story.. cuz the disks used to install this load (is strictly monitored)
and comes with just perl, and they wont let me add any external modules to
the disk. These disks are the ones sent to customer and getting anything
added in there, would need to waddle thru lot of red tape. so, iam just
stuck with core modules of perl.

Iam just playing around to see if i can write my own simplistic xml parser
(non validating) in perl. Worst case i would just use a .properties file
with name value pairs instead of xml. :(

I don't think regex have the capabilities to handle nesting too well
especially when it comes to xml. Either way xml has to be streamed.
Just because it can be done to a degree, doesen't mean you can assign
any organization and structure to it within a regex.

Consider:

use strict;
use warnings;

my $cnt = 1;

$_ =
"<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>root>";
print $_,"\n";
while (s/<([\[\]0-9a-z]+)>/[$cnt]/) { print $cnt," = ",$1,"\n"; $cnt++}

__END__


1 = oftheemergency
2 = thisisatest[1]asdfsaf
3 = maybenot
4 = asd[3]fasdf
5 = thisshou[4]ldprint
6 = outer[2][5]root
 
M

Matt Garrish

I don't think regex have the capabilities to handle nesting too well
especially when it comes to xml. Either way xml has to be streamed.
Just because it can be done to a degree, doesen't mean you can assign
any organization and structure to it within a regex.

Consider:

use strict;
use warnings;

my $cnt = 1;

$_ =
"<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>root>";
print $_,"\n";
while (s/<([\[\]0-9a-z]+)>/[$cnt]/) { print $cnt," = ",$1,"\n"; $cnt++}

Please go back and learn some more about xml before posting. Where did you
get the idea that it is possible to nest tags within tags in xml? You can
use CDATA sections if you don't want to use entities for < in text nodes,
but that still leaves your above example as nothing but a lot of garbage.
You couldn't even get away with nesting < inside attributes. XML is smarter
than you.

Matt
 
T

Tad McClellan

Madhu Ramachandran said:
I apologize about the subject heading.


Have you seen the Posting Guidelines that are posted here frequently?

1. About \b,
I was able to test the foll and it works..


Does "foll" mean "following"?

Please use proper spelling, not doing so is inconsiderate of
those of us who don't have English as a first language.

so i want to recognize tokens which start with < and end with >,
and ignore any embedded < or >


Those characters are not allowed to be so embedded in XML.

If you change your requirement to: start with < and end with >,
and disallow embedded < and >, then:

ie. match <token>, but dont match tok<en>


So you want to match a \W character before <, and a \W
character after >.

but can't seem to get it working with /\b<[a-z]+>\b/


You need the "anti \b", which matches between /W/W or
between /w/w:

2. Regarding not using standard xml parser..
[snip]

so, iam just
stuck with core modules of perl.


Don't call your data "XML" if it does not comply with the
specifications that define XML.

"XML-like" would be more accurate.

If you call it "XML" then your code must do the Right Thing when
it encounters data like this:

<!-- <not_a_tag> -->

for example.

Iam just playing around to see if i can write my own simplistic xml parser


Stop calling it XML if it isn't really XML.

So, you want to make your own "angle brackety parser". :)
 
T

Tad McClellan

I don't think regex have the capabilities to handle nesting too well
especially when it comes to xml.

"<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>root>";


That is not XML.
 
R

robic0

Tad said:
That is not XML.

Sure it is, you just didn't do the substitution. Do I have to do
everything for you?

use strict;
use warnings;

my $cnt = 1;

$_ =
"<<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>root>>";
print $_,"\n";
while (s/<([\[\]0-9a-z]+)>/[$cnt]/) { print $cnt," = ",$1,"\n"; $cnt++}


my $gabage1 =
"<T7><T6>outer<T2>thisisatest<T1>oftheemergency</T1>asdfsaf</T2><T5><T0></T0>this
shou<T4>asd<T3>maybenot</T3>fasdf</T4>ldprint<Z0/></T5>root</T6></T7>";

my $gabage2 =
"<outer>asdf<in1><in2>jjjj</in2><in3>asbefas</in3></in1>asdfb</outer>";

my @xml_ary = ($gabage1, $gabage2);

for (@xml_ary) {
$cnt = 1;
print "\n$_\n\n";
while (s/<([0-9a-zA-Z]+)\/>/[$cnt]/) { print "$cnt <$1> = \n"; $cnt++}
while (s/<([\[\]0-9a-zA-Z]+)>([^<]*)<\/\1>/[$cnt]/) { print "$cnt <$1>
= $2\n"; $cnt++}
}

__END__


<<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>
root>>
1 = oftheemergency
2 = thisisatest[1]asdfsaf
3 = maybenot
4 = asd[3]fasdf
5 = thisshou[4]ldprint
6 = outer[2][5]root
7 = [6]

<T7><T6>outer<T2>thisisatest<T1>oftheemergency</T1>asdfsaf</T2><T5><T0></T0>this
shou<T4>asd<T3>maybenot</T3>fasdf</T4>ldprint<Z0/></T5>root</T6></T7>

1 <Z0> =
2 <T1> = oftheemergency
3 <T2> = thisisatest[2]asdfsaf
4 <T0> =
5 <T3> = maybenot
6 <T4> = asd[5]fasdf
7 <T5> = [4]this
shou[6]ldprint[1]
8 <T6> = outer[3][7]root
9 <T7> = [8]

<outer>asdf<in1><in2>jjjj</in2><in3>asbefas</in3></in1>asdfb</outer>

1 <in2> = jjjj
2 <in3> = asbefas
3 <in1> = [1][2]
4 <outer> = asdf[3]asdfb
 
R

robic0

Tad said:
That is not XML.

Sure it is, you just didn't do the substitution. Do I have to do
everything for you?

use strict;
use warnings;

my $cnt = 1;

$_ =
"<<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>root>>";
print $_,"\n";
while (s/<([\[\]0-9a-z]+)>/[$cnt]/) { print $cnt," = ",$1,"\n"; $cnt++}


my $gabage1 =
"<T7><T6>outer<T2>thisisatest<T1>oftheemergency</T1>asdfsaf</T2><T5><T0></T0>this
shou<T4>asd<T3>maybenot</T3>fasdf</T4>ldprint<Z0/></T5>root</T6></T7>";

my $gabage2 =
"<outer>asdf<in1><in2>jjjj</in2><in3>asbefas</in3></in1>asdfb</outer>";

my @xml_ary = ($gabage1, $gabage2);

for (@xml_ary) {
$cnt = 1;
print "\n$_\n\n";
while (s/<([0-9a-zA-Z]+)\/>/[$cnt]/) { print "$cnt <$1> = \n"; $cnt++}
while (s/<([\[\]0-9a-zA-Z]+)>([^<]*)<\/\1>/[$cnt]/) { print "$cnt <$1>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Correction:
while (s/<([0-9a-zA-Z]+)>([^<]*)<\/\1>/[$cnt]/) {

Staying on topic, lets account for attributes, get rid of the
"[$cnt]", account for comments, then create a hash to represent this
xml.
How hard can it be? Complex entities (already there, imbed). I laid
out the form, the guts of it.
Resigned to let others do your thinking?
Can't take a shit without a xml module to wipe your ass?
I think the OP has a good point here, lets do it..
= $2\n"; $cnt++}
}

__END__


<<outer<thisisatest<oftheemergency>asdfsaf><thisshou<asd<maybenot>fasdf>ldprint>
root>>
1 = oftheemergency
2 = thisisatest[1]asdfsaf
3 = maybenot
4 = asd[3]fasdf
5 = thisshou[4]ldprint
6 = outer[2][5]root
7 = [6]

<T7><T6>outer<T2>thisisatest<T1>oftheemergency</T1>asdfsaf</T2><T5><T0></T0>this
shou<T4>asd<T3>maybenot</T3>fasdf</T4>ldprint<Z0/></T5>root</T6></T7>

1 <Z0> =
2 <T1> = oftheemergency
3 <T2> = thisisatest[2]asdfsaf
4 <T0> =
5 <T3> = maybenot
6 <T4> = asd[5]fasdf
7 <T5> = [4]this
shou[6]ldprint[1]
8 <T6> = outer[3][7]root
9 <T7> = [8]

<outer>asdf<in1><in2>jjjj</in2><in3>asbefas</in3></in1>asdfb</outer>

1 <in2> = jjjj
2 <in3> = asbefas
3 <in1> = [1][2]
4 <outer> = asdf[3]asdfb
 
J

Joe Smith

Sure it is

No, it is not. It does not look anything like this:

<outer>
<thisisatest>
<oftheemergency>
asdfsaf
</oftheemergency>
</thisisatest>
</outer>

Items can be between <tag> and </tag>, not in the middle of "<tag".
-Joe
 
J

Joe Smith

Madhu said:
I apologize about the subject heading. changed it now and will keep that in
mind in my future posts.

1. About \b,
The book iam using says \b is a "Word-Boundary Pattern Anchor".
eg:
/\bdef/ matches def and and defghi, but will not match abcdef
and /\bdef\b/ will match exactly def, not abcdef or defghi

I was able to test the foll and it works..
when i tested $inp =~ /\bget[a-z]*lost\b/

only getlost or getAnyLetterHerelost works.. but agetlost or getlostb does
not work.. so i want to recognize tokens which start with < and end with >,

Hold it. '<' and '>' are not alphanumeric characters.
The \b is used when you have a string of alphanumeric+underscore
characters and want to not match adjacent alphanumeric+underscore
characters.
and ignore any embedded < or >

That does not make sense.
ie. match <token>, but dont match tok<en>

If you want to match a '<' that is not preceded by an alphabetical
character, you need to use a different approach than \b.
-Joe
 
R

robic0

On 16 Dec 2005 15:00:02 -0800, "(e-mail address removed)" <[email protected]>
wrote:

Staying on topic, lets account for attributes, get rid of the
"[$cnt]", account for comments, then create a hash to represent this
xml.
How hard can it be? Complex entities (already there, imbed). I laid
out the form, the guts of it.
Resigned to let others do your thinking?
Can't take a shit without a xml module to wipe your ass?
I think the OP has a good point here, lets do it..

Lets see, where did we leave off here.. Oh yeah, xml parser.
Phase 2 proof of concept. At phase 3 is converting to variables,
i'll post a new thread for a complete cut and paste.
I'm estimating bringing in a cut an paste xml parser code at near
60 lines. Hold on to your gottrocks...

use strict;
use warnings;

my $gabage1 = '

<document WMSNameSpaceVersion="2.0">

<node name="Control Protocol" opcode="create" >
<node name="Object Store" opcode="create" >
<node name="RTSP" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{308786f0-8b15-11d2-b25f-006097d2e41e}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Protocol" opcode="create" type="string"
value="RTSP,RTSPA,RTSPT,RTSPU,RTSPM" />
</node> <!-- Properties -->

</node> <!-- RTSP -->

<node name="Sessionless Multicast" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{f9377800-f38d-11d2-b26c-006097d2e41e}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Protocol" opcode="create" type="string"
value="MCAST,RTP" />
</node> <!-- Properties -->

</node> <!-- Sessionless Multicast -->

</node> <!-- Object Store -->

<node name="Shared Properties" opcode="create" />
</node> <!-- Control Protocol -->

<node name="Data Protocol" opcode="create" >
<node name="Object Store" opcode="create" >
<node name="RTP" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{cbfb2e20-ab7b-11d2-b261-006097d2e41e}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="x-asf-pf" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTP -->

<node name="RTP/ASF" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{149a44be-dc14-4e94-9cb0-c0268e77df9e}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="x-asfv2-pf,x-asfv2-grp-pf,x-asfv2-frag-pf" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTP/ASF -->

<node name="RTP/AVP" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{d7335e2e-62eb-4ad0-96cd-b31c9d0f9f85}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="PCMU,L8,L16,MPA,G726-24,G726-40" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTP/AVP -->

<node name="RTP/FEC" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{02DEFE42-F8FC-11d2-8670-00C04F6890ED}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="parityfec" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTP/FEC -->

<node name="RTP/WMS-FEC" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{EDAB8E6B-746C-40db-A885-9E4A9EEF27A2}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="wms-fec" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTP/WMS-FEC -->

</node> <!-- Object Store -->

<node name="Shared Properties" opcode="create" />
</node> <!-- Data Protocol -->

<node name="Feedback Protocol" opcode="create" >
<node name="Object Store" opcode="create" >
<node name="RTCP" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{ecfddc81-184e-11d3-ae84-00a0c95ec3f0}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Format" opcode="create" type="string"
value="x-wms-rtx" />
<node name="Protocol" opcode="create" type="string"
value="RTP/AVP" />
</node> <!-- Properties -->

</node> <!-- RTCP -->

</node> <!-- Object Store -->

<node name="Shared Properties" opcode="create" />
</node> <!-- Feedback Protocol -->

<node name="Network Source" opcode="create" >
<node name="Object Store" opcode="create" >
<node name="WMS Http Network Source" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{566A2EFF-5651-4020-AC1A-EB48E4571EA3}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Source Type" opcode="create" type="string"
value="HTTP" />
<node name="DefaultHttpServerPort" opcode="create"
type="int32" value="0x50" />
<node name="DefaultHttpServerSSLPort" opcode="create"
type="int32" value="0x1bb" />
<node name="PacketBuffers" opcode="create" type="int32"
value="0x8" />
<node name="EnableHTTP1_1" opcode="create" type="int32"
value="0x1" />
<node name="OpenTimeout" opcode="create" type="int32"
value="0x1e" />
<node name="SecondSegmentTimeout" opcode="create"
type="int32" value="0x64" />
<node name="ControlAdapter" opcode="create" type="string"
value="" />
<node name="PercentBWUsageForAccelStreaming" opcode="create"
type="int32" value="0x55" />
<node name="Proxy Setting" opcode="create" type="int32"
value="0x3" />
<node name="ProxyHostName" opcode="create" type="string"
value="" />
<node name="ProxyPort" opcode="create" type="int32"
value="0x50" />
<node name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0" />
</node> <!-- Properties -->

</node> <!-- WMS Http Network Source -->

<node name="WMS Mms Network Source" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{DCF6C8B2-F6C0-461b-82DA-35945EADF54A}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Source Type" opcode="create" type="string"
value="MMS,MMST,MMSU" />
<node name="DefaultServerPort" opcode="create" type="int32"
value="0x6db" />
<node name="MaxReadHeaderRetries" opcode="create"
type="int32" value="0x4" />
<node name="PacketBuffers" opcode="create" type="int32"
value="0x8" />
<node name="DropProb" opcode="create" type="int32"
value="0x0" />
<node name="DropGracePeriod" opcode="create" type="int32"
value="0x0" />
<node name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0" />
<node name="DropBurstDuration" opcode="create" type="int32"
value="0x0" />
<node name="PacketPairDropProb" opcode="create" type="int32"
value="0x0" />
<node name="NackAlgorithm" opcode="create" type="int32"
value="0x2" />
<node name="NackRateMultiplier" opcode="create" type="int32"
value="0x1" />
<node name="NackBurst" opcode="create" type="int32"
value="0x5dc" />
<node name="NackTraceInterval" opcode="create" type="int32"
value="0x3e8" />
<node name="NackRetry" opcode="create" type="int32"
value="0x1" />
<node name="IgnoreServerVersion" opcode="create"
type="int32" value="0x0" />
<node name="EnableMmsDistribution" opcode="create"
type="int32" value="0x0" />
<node name="AssertStrangeErrors" opcode="create"
type="int32" value="0x0" />
<node name="InactivityTimeout" opcode="create" type="int32"
value="0x5a" />
<node name="OpenTimeout" opcode="create" type="int32"
value="0x20" />
<node name="PercentBWUsageForAccelStreaming" opcode="create"
type="int32" value="0x55" />
<node name="FunnelAdapter" opcode="create" type="string"
value="" />
<node name="ControlAdapter" opcode="create" type="string"
value="" />
<node name="Proxy Setting" opcode="create" type="int32"
value="0x0" />
<node name="ProxyHostName" opcode="create" type="string"
value="" />
<node name="ProxyPort" opcode="create" type="int32"
value="0x6db" />
<node name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0" />
</node> <!-- Properties -->

</node> <!-- WMS Mms Network Source -->

<node name="WMS Msbd Network Source" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{FB74F625-7D25-4455-B840-7B870B5B9322}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Source Type" opcode="create" type="string"
value="ASFM" />
<node name="PacketBuffers" opcode="create" type="int32"
value="0x8" />
<node name="DropProb" opcode="create" type="int32"
value="0x0" />
<node name="DropGracePeriod" opcode="create" type="int32"
value="0x0" />
<node name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0" />
<node name="DropBurstDuration" opcode="create" type="int32"
value="0x0" />
<node name="McastTimeout" opcode="create" type="int32"
value="0x3a98" />
<node name="EnableIGMPv3" opcode="create" type="int32"
value="0x1" />
</node> <!-- Properties -->

</node> <!-- WMS Msbd Network Source -->

<node name="WMS Network Source" opcode="create" >
<node name="CLSID" opcode="create" type="string"
value="{ad763fa6-3b90-41ab-bd44-4f832beee55f}" />
<node name="Enabled" opcode="create" type="int32" value="0x1"
/>
<node name="Properties" opcode="create" >
<node name="Source Type" opcode="create" type="string"
value="RTSP,XSDP,RTP,RTSPA,RTSPT,RTSPU,RTSPM" />
<node name="EnableATM" opcode="create" type="int32"
value="0x1" />
<node name="MaximumMTU" opcode="create" type="int32"
value="0x0" />
<node name="FirewallTimeout" opcode="create" type="int32"
value="0x14" />
<node name="OpenTimeout" opcode="create" type="int32"
value="0x1e" />
<node name="RtxDropProb" opcode="create" type="int32"
value="0x0" />
<node name="DropProb" opcode="create" type="int32"
value="0x0" />
<node name="DropGracePeriod" opcode="create" type="int32"
value="0x0" />
<node name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0" />
<node name="DropBurstDuration" opcode="create" type="int32"
value="0x0" />
<node name="PacketPairDropProb" opcode="create" type="int32"
value="0x0" />
<node name="NackAlgorithm" opcode="create" type="int32"
value="0x2" />
<node name="NackRateMultiplier" opcode="create" type="int32"
value="0x1" />
<node name="NackBurst" opcode="create" type="int32"
value="0x5dc" />
<node name="NackTraceInterval" opcode="create" type="int32"
value="0x3e8" />
<node name="NackRetry" opcode="create" type="int32"
value="0x1" />
<node name="BurstProtection" opcode="create" type="int32"
value="0x0" />
<node name="EmulateNetworkDisconnect" opcode="create"
type="int32" value="0x0" />
<node name="AssertStrangeErrors" opcode="create"
type="int32" value="0x0" />
<node name="PercentBWUsageForAccelStreaming" opcode="create"
type="int32" value="0x55" />
<node name="Proxy Setting" opcode="create" type="int32"
value="0x0" />
<node name="ProxyHostName" opcode="create" type="string"
value="" />
<node name="ProxyPort" opcode="create" type="int32"
value="0x22a" />
<node name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0" />
<node name="PktGracePeriodAtEOSForBPP" opcode="create"
type="int32" value="0x3e8" />
<node name="PktGracePeriodAtEOSForODP" opcode="create"
type="int32" value="0x9c4" />
</node> <!-- Properties -->

</node> <!-- WMS Network Source -->

</node> <!-- Object Store -->

<node name="Shared Properties" opcode="create" >
<node name="Local" opcode="create" />
</node> <!-- Shared Properties -->

</node> <!-- Network Source -->

</document>

';

my $gabage2 = '
<?xml version="1.0"?>
<items
xmlns="x-schema:http://schemas.windowsupdate.com/iu/resultschema.xml"><itemStatus
xmlns="" timestamp="2003-01-25T14:14:23"><identity
itemID="microsoft.otherhardware.ver_platform_win32_nt.5.0.x86.en...2195...com_microsoft_whql.4180278_87565."
name="4180278_87565"><publisherName>com_microsoft_whql</publisherName><guid>3EF47C8F-3352-984D-906B-8D27D021AC5D</guid><language>en</language></identity><description
hidden="0"
timestamp="2003-01-24T04:10:58.000"><descriptionText><title>Microsoft
Usb Driver Version 5.1.2600.0</title><eula
href="/msdownload/update/v3/static/eula/en/corp_eula.htm"/></descriptionText><size>110336</size></description><platform
name="ver_platform_win32_nt"><processorArchitecture>x86</processorArchitecture><version
major="5" minor="0" build="2195" servicePackMajor=""
servicePackMinor=""/><productType/><suite/></platform><downloadStatus
value="COMPLETE"/><downloadPath>C:\Drvs13\Giga-Byte\Driver\en\com_microsoft_whql.otherhardware\x86win2k\com_microsoft_whql.4180278_87565</downloadPath><client>IU_Corp_Site</client></itemStatus></items>
';

my $gabage3 = '
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<Submission SubmissionID="688904">
<Category CategoryName="Storage/Adapter or Controller">
<Driver FolderName="driver000">
<Language LanguageName="English">
<PackageCreationLocation
FolderName="G:\truyen\WHQL\Athena\raid\driver" />
</Language>
</Driver>
</Category>
</Submission>
</XMLDATA>
';

my $rmv_white = 1;
my @xml_ary = ($gabage1, $gabage2, $gabage3);

for (@xml_ary) {
if ($rmv_white) {
s/>[\s]+</></g;
s/[\s]+</</g;
s/>[\s]+/>/g;
}
print "\n",'='x30,"\n$_\n\n";

my ($last_cnt, $cnt, $i) = (-1, 1, 0);

# should only need 2 iterations max, but wth
while ($cnt != $last_cnt && $i < 20)
{
$last_cnt = $cnt;

# have to check the format of '<?'
while (s/<\?([^<>]*)\?>/[$cnt]/i) { print "$cnt <$1> =
\n"; $cnt++}

while (s/<!--([^<>]*)-->/[$cnt]/i) { print "$cnt <!--
--> = $1\n"; $cnt++}

# need to have "anything but <!-- nor --> here", oh
well regex sucks
# while (s/<!--([^(<!--)^(-->)]*)-->/[$cnt]/i) { print
"$cnt <!-- --> = $1\n"; $cnt++}

while (s/<([0-9a-zA-Z]+)\/>/[$cnt]/i) { print "$cnt
<$1> = \n"; $cnt++}
while (s/<([0-9a-zA-Z]+)([ ]+[0-9a-zA-Z]+[
]*=[^<]*)+\/>/[$cnt]/i) { print "$cnt <$1> = attr: $2\n"; $cnt++}

while (s/<([0-9a-zA-Z]+)>([^<]*)<\/\1>/[$cnt]/i) {
print "$cnt <$1> = $2\n"; $cnt++}
while (s/<([0-9a-zA-Z]+)([ ]+[0-9a-zA-Z]+[
]*=[^<]*)+>([^<]*)<\/\1>/[$cnt]/i) { print "$cnt <$1> = attr: $2,
content: $3\n"; $cnt++}

$i++ if ($last_cnt != $cnt);

}
if (/<|>/) { print "($i) Error, invalid xml, tag
closure:\n$_"; } else { print "$i itterations\n"; }
}



__END__


==============================
<document WMSNameSpaceVersion="2.0"><node name="Control Protocol"
opcode="create" ><node name="Object Store" opcode="create" ><node
name="RTSP" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{308786f0-8b15-11d2-b25f-006097d2e41e}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Protocol"
opcode="create" type="string" value="RTSP,RTSPA,RTSPT,RTSPU,RTSPM"
/></node><!-- Properties --></node><!-- RTSP --><node
name="Sessionless Multicast" opcode="create" ><node name="CLSID"
opcode="create" type="string"
value="{f9377800-f38d-11d2-b26c-006097d2e41e}" /><node name="Enabled"
opcode="create" type="int32" value="0x1" /><node name="Properties"
opcode="create" ><node name="Protocol" opcode="create" type="string"
value="MCAST,RTP" /></node><!-- Properties --></node><!-- Sessionless
Multicast --></node><!-- Object Store --><node name="Shared
Properties" opcode="create" /></node><!-- Control Protocol --><node
name="Data Protocol" opcode="create" ><node name="Object Store"
opcode="create" ><node name="RTP" opcode="create" ><node name="CLSID"
opcode="create" type="string"
value="{cbfb2e20-ab7b-11d2-b261-006097d2e41e}" /><node name="Enabled"
opcode="create" type="int32" value="0x1" /><node name="Properties"
opcode="create" ><node name="Format" opcode="create" type="string"
value="x-asf-pf" /><node name="Protocol" opcode="create" type="string"
value="RTP/AVP" /></node><!-- Properties --></node><!-- RTP --><node
name="RTP/ASF" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{149a44be-dc14-4e94-9cb0-c0268e77df9e}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Format" opcode="create"
type="string" value="x-asfv2-pf,x-asfv2-grp-pf,x-asfv2-frag-pf"
/><node name="Protocol" opcode="create" type="string" value="RTP/AVP"
/></node><!-- Properties --></node><!-- RTP/ASF --><node
name="RTP/AVP" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{d7335e2e-62eb-4ad0-96cd-b31c9d0f9f85}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Format" opcode="create"
type="string" value="PCMU,L8,L16,MPA,G726-24,G726-40" /><node
name="Protocol" opcode="create" type="string" value="RTP/AVP"
/></node><!-- Properties --></node><!-- RTP/AVP --><node
name="RTP/FEC" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{02DEFE42-F8FC-11d2-8670-00C04F6890ED}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Format" opcode="create"
type="string" value="parityfec" /><node name="Protocol"
opcode="create" type="string" value="RTP/AVP" /> said:
<node name="CLSID" opcode="create" type="string"
value="{EDAB8E6B-746C-40db-A885-9E4A9EEF27A2}" /><node name="Enabled"
opcode="create" type="int32" value="0x1" /><node name="Properties"
opcode="create" ><node name="Format" opcode="create" type="string"
value="wms-fec" /><node name="Protocol" opcode="create" type="string"
value="RTP/AVP" /></node><!-- Properties --></node><!-- RTP/WMS-FEC
--></node><!-- Object Store --><node name="Shared Properties"
opcode="create" /> said:
<node name="RTCP" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{ecfddc81-184e-11d3-ae84-00a0c95ec3f0}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Format" opcode="create"
type="string" value="x-wms-rtx" /><node name="Protocol"
opcode="create" type="string" value="RTP/AVP" /></node><!-- Properties
--></node><!-- RTCP --></node><!-- Object Store --><node name="Shared
Properties" opcode="create" /></node><!-- Feedback Protocol --><node
name="Network Source" opcode="create" ><node name="Object Store"
opcode="create" ><node name="WMS Http Network Source" opcode="create"
<node name="CLSID" opcode="create" type="string"
value="{566A2EFF-5651-4020-AC1A-EB48E4571EA3}" /><node name="Enabled"
opcode="create" type="int32" value="0x1" /><node name="Properties"
opcode="create" ><node name="Source Type" opcode="create"
type="string" value="HTTP" /><node name="DefaultHttpServerPort"
opcode="create" type="int32" value="0x50" /><node
name="DefaultHttpServerSSLPort" opcode="create" type="int32"
value="0x1bb" /><node name="PacketBuffers" opcode="create"
type="int32" value="0x8" /><node name="EnableHTTP1_1" opcode="create"
type="int32" value="0x1" /><node name="OpenTimeout" opcode="create"
type="int32" value="0x1e" /><node name="SecondSegmentTimeout"
opcode="create" type="int32" value="0x64" /><node
name="ControlAdapter" opcode="create" type="string" value="" /><node
name="PercentBWUsageForAccelStreaming" opcode="create" type="int32"
value="0x55" /><node name="Proxy Setting" opcode="create" type="int32"
value="0x3" /><node name="ProxyHostName" opcode="create" type="string"
value="" /><node name="ProxyPort" opcode="create" type="int32"
value="0x50" /><node name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0" /></node><!-- Properties --></node><!-- WMS
Http Network Source --><node name="WMS Mms Network Source"
opcode="create" ><node name="CLSID" opcode="create" type="string"
value="{DCF6C8B2-F6C0-461b-82DA-35945EADF54A}" /><node name="Enabled"
opcode="create" type="int32" value="0x1" /><node name="Properties"
opcode="create" ><node name="Source Type" opcode="create"
type="string" value="MMS,MMST,MMSU" /><node name="DefaultServerPort"
opcode="create" type="int32" value="0x6db" /><node
name="MaxReadHeaderRetries" opcode="create" type="int32" value="0x4"
/><node name="PacketBuffers" opcode="create" type="int32" value="0x8"
/><node name="DropProb" opcode="create" type="int32" value="0x0"
/><node name="DropGracePeriod" opcode="create" type="int32"
value="0x0" /><node name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0" /><node name="DropBurstDuration"
opcode="create" type="int32" value="0x0" /><node
name="PacketPairDropProb" opcode="create" type="int32" value="0x0"
/><node name="NackAlgorithm" opcode="create" type="int32" value="0x2"
/><node name="NackRateMultiplier" opcode="create" type="int32"
value="0x1" /><node name="NackBurst" opcode="create" type="int32"
value="0x5dc" /><node name="NackTraceInterval" opcode="create"
type="int32" value="0x3e8" /><node name="NackRetry" opcode="create"
type="int32" value="0x1" /><node name="IgnoreServerVersion"
opcode="create" type="int32" value="0x0" /><node
name="EnableMmsDistribution" opcode="create" type="int32" value="0x0"
/><node name="AssertStrangeErrors" opcode="create" type="int32"
value="0x0" /><node name="InactivityTimeout" opcode="create"
type="int32" value="0x5a" /><node name="OpenTimeout" opcode="create"
type="int32" value="0x20" /><node
name="PercentBWUsageForAccelStreaming" opcode="create" type="int32"
value="0x55" /><node name="FunnelAdapter" opcode="create"
type="string" value="" /><node name="ControlAdapter" opcode="create"
type="string" value="" /><node name="Proxy Setting" opcode="create"
type="int32" value="0x0" /><node name="ProxyHostName" opcode="create"
type="string" value="" /><node name="ProxyPort" opcode="create"
type="int32" value="0x6db" /><node name="ProxyBypassForLocal"
opcode="create" type="int32" value="0x0" /></node><!-- Properties
--></node><!-- WMS Mms Network Source --><node name="WMS Msbd Network
Source" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{FB74F625-7D25-4455-B840-7B870B5B9322}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Source Type"
opcode="create" type="string" value="ASFM" /><node
name="PacketBuffers" opcode="create" type="int32" value="0x8" /><node
name="DropProb" opcode="create" type="int32" value="0x0" /><node
name="DropGracePeriod" opcode="create" type="int32" value="0x0"
/><node name="FirstDropGracePeriod" opcode="create" type="int32"
value="0x0" /><node name="DropBurstDuration" opcode="create"
type="int32" value="0x0" /><node name="McastTimeout" opcode="create"
type="int32" value="0x3a98" /><node name="EnableIGMPv3"
opcode="create" type="int32" value="0x1" /></node><!-- Properties
--></node><!-- WMS Msbd Network Source --><node name="WMS Network
Source" opcode="create" ><node name="CLSID" opcode="create"
type="string" value="{ad763fa6-3b90-41ab-bd44-4f832beee55f}" /><node
name="Enabled" opcode="create" type="int32" value="0x1" /><node
name="Properties" opcode="create" ><node name="Source Type"
opcode="create" type="string"
value="RTSP,XSDP,RTP,RTSPA,RTSPT,RTSPU,RTSPM" /><node name="EnableATM"
opcode="create" type="int32" value="0x1" /><node name="MaximumMTU"
opcode="create" type="int32" value="0x0" /><node
name="FirewallTimeout" opcode="create" type="int32" value="0x14"
/><node name="OpenTimeout" opcode="create" type="int32" value="0x1e"
/><node name="RtxDropProb" opcode="create" type="int32" value="0x0"
/><node name="DropProb" opcode="create" type="int32" value="0x0"
/><node name="DropGracePeriod" opcode="create" type="int32"
value="0x0" /><node name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0" /><node name="DropBurstDuration"
opcode="create" type="int32" value="0x0" /><node
name="PacketPairDropProb" opcode="create" type="int32" value="0x0"
/><node name="NackAlgorithm" opcode="create" type="int32" value="0x2"
/><node name="NackRateMultiplier" opcode="create" type="int32"
value="0x1" /><node name="NackBurst" opcode="create" type="int32"
value="0x5dc" /><node name="NackTraceInterval" opcode="create"
type="int32" value="0x3e8" /><node name="NackRetry" opcode="create"
type="int32" value="0x1" /><node name="BurstProtection"
opcode="create" type="int32" value="0x0" /><node
name="EmulateNetworkDisconnect" opcode="create" type="int32"
value="0x0" /><node name="AssertStrangeErrors" opcode="create"
type="int32" value="0x0" /><node
name="PercentBWUsageForAccelStreaming" opcode="create" type="int32"
value="0x55" /><node name="Proxy Setting" opcode="create" type="int32"
value="0x0" /><node name="ProxyHostName" opcode="create" type="string"
value="" /><node name="ProxyPort" opcode="create" type="int32"
value="0x22a" /><node name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0" /><node name="PktGracePeriodAtEOSForBPP"
opcode="create" type="int32" value="0x3e8" /><node
name="PktGracePeriodAtEOSForODP" opcode="create" type="int32"
value="0x9c4" /></node><!-- Properties --></node><!-- WMS Network
Source --></node><!-- Object Store --><node name="Shared Properties"
opcode="create" ><node name="Local" opcode="create" /></node><!--
Shared Properties --></node><!-- Network Source --></document>

1 <!-- --> = Properties
2 <!-- --> = RTSP
3 <!-- --> = Properties
4 <!-- --> = Sessionless Multicast
5 <!-- --> = Object Store
6 <!-- --> = Control Protocol
7 <!-- --> = Properties
8 <!-- --> = RTP
9 <!-- --> = Properties
10 <!-- --> = RTP/ASF
11 <!-- --> = Properties
12 <!-- --> = RTP/AVP
13 <!-- --> = Properties
14 <!-- --> = RTP/FEC
15 <!-- --> = Properties
16 <!-- --> = RTP/WMS-FEC
17 <!-- --> = Object Store
18 <!-- --> = Data Protocol
19 <!-- --> = Properties
20 <!-- --> = RTCP
21 <!-- --> = Object Store
22 <!-- --> = Feedback Protocol
23 <!-- --> = Properties
24 <!-- --> = WMS Http Network Source
25 <!-- --> = Properties
26 <!-- --> = WMS Mms Network Source
27 <!-- --> = Properties
28 <!-- --> = WMS Msbd Network Source
29 <!-- --> = Properties
30 <!-- --> = WMS Network Source
31 <!-- --> = Object Store
32 <!-- --> = Shared Properties
33 <!-- --> = Network Source
34 <node> = attr: name="CLSID" opcode="create" type="string"
value="{308786f0-8b15-11d2-b25f-006097d2e41e}"
35 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
36 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTSP,RTSPA,RTSPT,RTSPU,RTSPM"
37 <node> = attr: name="CLSID" opcode="create" type="string"
value="{f9377800-f38d-11d2-b26c-006097d2e41e}"
38 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
39 <node> = attr: name="Protocol" opcode="create" type="string"
value="MCAST,RTP"
40 <node> = attr: name="Shared Properties" opcode="create"
41 <node> = attr: name="CLSID" opcode="create" type="string"
value="{cbfb2e20-ab7b-11d2-b261-006097d2e41e}"
42 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
43 <node> = attr: name="Format" opcode="create" type="string"
value="x-asf-pf"
44 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
45 <node> = attr: name="CLSID" opcode="create" type="string"
value="{149a44be-dc14-4e94-9cb0-c0268e77df9e}"
46 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
47 <node> = attr: name="Format" opcode="create" type="string"
value="x-asfv2-pf,x-asfv2-grp-pf,x-asfv2-frag-pf"
48 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
49 <node> = attr: name="CLSID" opcode="create" type="string"
value="{d7335e2e-62eb-4ad0-96cd-b31c9d0f9f85}"
50 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
51 <node> = attr: name="Format" opcode="create" type="string"
value="PCMU,L8,L16,MPA,G726-24,G726-40"
52 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
53 <node> = attr: name="CLSID" opcode="create" type="string"
value="{02DEFE42-F8FC-11d2-8670-00C04F6890ED}"
54 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
55 <node> = attr: name="Format" opcode="create" type="string"
value="parityfec"
56 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
57 <node> = attr: name="CLSID" opcode="create" type="string"
value="{EDAB8E6B-746C-40db-A885-9E4A9EEF27A2}"
58 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
59 <node> = attr: name="Format" opcode="create" type="string"
value="wms-fec"
60 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
61 <node> = attr: name="Shared Properties" opcode="create"
62 <node> = attr: name="CLSID" opcode="create" type="string"
value="{ecfddc81-184e-11d3-ae84-00a0c95ec3f0}"
63 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
64 <node> = attr: name="Format" opcode="create" type="string"
value="x-wms-rtx"
65 <node> = attr: name="Protocol" opcode="create" type="string"
value="RTP/AVP"
66 <node> = attr: name="Shared Properties" opcode="create"
67 <node> = attr: name="CLSID" opcode="create" type="string"
value="{566A2EFF-5651-4020-AC1A-EB48E4571EA3}"
68 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
69 <node> = attr: name="Source Type" opcode="create" type="string"
value="HTTP"
70 <node> = attr: name="DefaultHttpServerPort" opcode="create"
type="int32" value="0x50"
71 <node> = attr: name="DefaultHttpServerSSLPort" opcode="create"
type="int32" value="0x1bb"
72 <node> = attr: name="PacketBuffers" opcode="create" type="int32"
value="0x8"
73 <node> = attr: name="EnableHTTP1_1" opcode="create" type="int32"
value="0x1"
74 <node> = attr: name="OpenTimeout" opcode="create" type="int32"
value="0x1e"
75 <node> = attr: name="SecondSegmentTimeout" opcode="create"
type="int32" value="0x64"
76 <node> = attr: name="ControlAdapter" opcode="create" type="string"
value=""
77 <node> = attr: name="PercentBWUsageForAccelStreaming"
opcode="create" type="int32" value="0x55"
78 <node> = attr: name="Proxy Setting" opcode="create" type="int32"
value="0x3"
79 <node> = attr: name="ProxyHostName" opcode="create" type="string"
value=""
80 <node> = attr: name="ProxyPort" opcode="create" type="int32"
value="0x50"
81 <node> = attr: name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0"
82 <node> = attr: name="CLSID" opcode="create" type="string"
value="{DCF6C8B2-F6C0-461b-82DA-35945EADF54A}"
83 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
84 <node> = attr: name="Source Type" opcode="create" type="string"
value="MMS,MMST,MMSU"
85 <node> = attr: name="DefaultServerPort" opcode="create"
type="int32" value="0x6db"
86 <node> = attr: name="MaxReadHeaderRetries" opcode="create"
type="int32" value="0x4"
87 <node> = attr: name="PacketBuffers" opcode="create" type="int32"
value="0x8"
88 <node> = attr: name="DropProb" opcode="create" type="int32"
value="0x0"
89 <node> = attr: name="DropGracePeriod" opcode="create" type="int32"
value="0x0"
90 <node> = attr: name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0"
91 <node> = attr: name="DropBurstDuration" opcode="create"
type="int32" value="0x0"
92 <node> = attr: name="PacketPairDropProb" opcode="create"
type="int32" value="0x0"
93 <node> = attr: name="NackAlgorithm" opcode="create" type="int32"
value="0x2"
94 <node> = attr: name="NackRateMultiplier" opcode="create"
type="int32" value="0x1"
95 <node> = attr: name="NackBurst" opcode="create" type="int32"
value="0x5dc"
96 <node> = attr: name="NackTraceInterval" opcode="create"
type="int32" value="0x3e8"
97 <node> = attr: name="NackRetry" opcode="create" type="int32"
value="0x1"
98 <node> = attr: name="IgnoreServerVersion" opcode="create"
type="int32" value="0x0"
99 <node> = attr: name="EnableMmsDistribution" opcode="create"
type="int32" value="0x0"
100 <node> = attr: name="AssertStrangeErrors" opcode="create"
type="int32" value="0x0"
101 <node> = attr: name="InactivityTimeout" opcode="create"
type="int32" value="0x5a"
102 <node> = attr: name="OpenTimeout" opcode="create" type="int32"
value="0x20"
103 <node> = attr: name="PercentBWUsageForAccelStreaming"
opcode="create" type="int32" value="0x55"
104 <node> = attr: name="FunnelAdapter" opcode="create" type="string"
value=""
105 <node> = attr: name="ControlAdapter" opcode="create"
type="string" value=""
106 <node> = attr: name="Proxy Setting" opcode="create" type="int32"
value="0x0"
107 <node> = attr: name="ProxyHostName" opcode="create" type="string"
value=""
108 <node> = attr: name="ProxyPort" opcode="create" type="int32"
value="0x6db"
109 <node> = attr: name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0"
110 <node> = attr: name="CLSID" opcode="create" type="string"
value="{FB74F625-7D25-4455-B840-7B870B5B9322}"
111 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
112 <node> = attr: name="Source Type" opcode="create" type="string"
value="ASFM"
113 <node> = attr: name="PacketBuffers" opcode="create" type="int32"
value="0x8"
114 <node> = attr: name="DropProb" opcode="create" type="int32"
value="0x0"
115 <node> = attr: name="DropGracePeriod" opcode="create"
type="int32" value="0x0"
116 <node> = attr: name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0"
117 <node> = attr: name="DropBurstDuration" opcode="create"
type="int32" value="0x0"
118 <node> = attr: name="McastTimeout" opcode="create" type="int32"
value="0x3a98"
119 <node> = attr: name="EnableIGMPv3" opcode="create" type="int32"
value="0x1"
120 <node> = attr: name="CLSID" opcode="create" type="string"
value="{ad763fa6-3b90-41ab-bd44-4f832beee55f}"
121 <node> = attr: name="Enabled" opcode="create" type="int32"
value="0x1"
122 <node> = attr: name="Source Type" opcode="create" type="string"
value="RTSP,XSDP,RTP,RTSPA,RTSPT,RTSPU,RTSPM"
123 <node> = attr: name="EnableATM" opcode="create" type="int32"
value="0x1"
124 <node> = attr: name="MaximumMTU" opcode="create" type="int32"
value="0x0"
125 <node> = attr: name="FirewallTimeout" opcode="create"
type="int32" value="0x14"
126 <node> = attr: name="OpenTimeout" opcode="create" type="int32"
value="0x1e"
127 <node> = attr: name="RtxDropProb" opcode="create" type="int32"
value="0x0"
128 <node> = attr: name="DropProb" opcode="create" type="int32"
value="0x0"
129 <node> = attr: name="DropGracePeriod" opcode="create"
type="int32" value="0x0"
130 <node> = attr: name="FirstDropGracePeriod" opcode="create"
type="int32" value="0x0"
131 <node> = attr: name="DropBurstDuration" opcode="create"
type="int32" value="0x0"
132 <node> = attr: name="PacketPairDropProb" opcode="create"
type="int32" value="0x0"
133 <node> = attr: name="NackAlgorithm" opcode="create" type="int32"
value="0x2"
134 <node> = attr: name="NackRateMultiplier" opcode="create"
type="int32" value="0x1"
135 <node> = attr: name="NackBurst" opcode="create" type="int32"
value="0x5dc"
136 <node> = attr: name="NackTraceInterval" opcode="create"
type="int32" value="0x3e8"
137 <node> = attr: name="NackRetry" opcode="create" type="int32"
value="0x1"
138 <node> = attr: name="BurstProtection" opcode="create"
type="int32" value="0x0"
139 <node> = attr: name="EmulateNetworkDisconnect" opcode="create"
type="int32" value="0x0"
140 <node> = attr: name="AssertStrangeErrors" opcode="create"
type="int32" value="0x0"
141 <node> = attr: name="PercentBWUsageForAccelStreaming"
opcode="create" type="int32" value="0x55"
142 <node> = attr: name="Proxy Setting" opcode="create" type="int32"
value="0x0"
143 <node> = attr: name="ProxyHostName" opcode="create" type="string"
value=""
144 <node> = attr: name="ProxyPort" opcode="create" type="int32"
value="0x22a"
145 <node> = attr: name="ProxyBypassForLocal" opcode="create"
type="int32" value="0x0"
146 <node> = attr: name="PktGracePeriodAtEOSForBPP" opcode="create"
type="int32" value="0x3e8"
147 <node> = attr: name="PktGracePeriodAtEOSForODP" opcode="create"
type="int32" value="0x9c4"
148 <node> = attr: name="Local" opcode="create"
149 <node> = attr: name="Properties" opcode="create" , content: [36]
150 <node> = attr: name="RTSP" opcode="create" , content:
[34][35][149][1]
151 <node> = attr: name="Properties" opcode="create" , content: [39]
152 <node> = attr: name="Sessionless Multicast" opcode="create" ,
content: [37][38][151][3]
153 <node> = attr: name="Object Store" opcode="create" , content:
[150][2][152][4]
154 <node> = attr: name="Control Protocol" opcode="create" , content:
[153][5][40]
155 <node> = attr: name="Properties" opcode="create" , content:
[43][44]
156 <node> = attr: name="RTP" opcode="create" , content:
[41][42][155][7]
157 <node> = attr: name="Properties" opcode="create" , content:
[47][48]
158 <node> = attr: name="RTP/ASF" opcode="create" , content:
[45][46][157][9]
159 <node> = attr: name="Properties" opcode="create" , content:
[51][52]
160 <node> = attr: name="RTP/AVP" opcode="create" , content:
[49][50][159][11]
161 <node> = attr: name="Properties" opcode="create" , content:
[55][56]
162 <node> = attr: name="RTP/FEC" opcode="create" , content:
[53][54][161][13]
163 <node> = attr: name="Properties" opcode="create" , content:
[59][60]
164 <node> = attr: name="RTP/WMS-FEC" opcode="create" , content:
[57][58][163][15]
165 <node> = attr: name="Object Store" opcode="create" , content:
[156][8][158][10][160][12][162][14][164][16]
166 <node> = attr: name="Data Protocol" opcode="create" , content:
[165][17][61]
167 <node> = attr: name="Properties" opcode="create" , content:
[64][65]
168 <node> = attr: name="RTCP" opcode="create" , content:
[62][63][167][19]
169 <node> = attr: name="Object Store" opcode="create" , content:
[168][20]
170 <node> = attr: name="Feedback Protocol" opcode="create" ,
content: [169][21][66]
171 <node> = attr: name="Properties" opcode="create" , content:
[69][70][71][72][73][74][75][76][77][78][79][80][81]
172 <node> = attr: name="WMS Http Network Source" opcode="create" ,
content: [67][68][171][23]
173 <node> = attr: name="Properties" opcode="create" , content:
[84][85][86][87][88][89][90][91][92][93][94][95][96][97][98][99][100][101][102][103][104][105][106][107][108][109]
174 <node> = attr: name="WMS Mms Network Source" opcode="create" ,
content: [82][83][173][25]
175 <node> = attr: name="Properties" opcode="create" , content:
[112][113][114][115][116][117][118][119]
176 <node> = attr: name="WMS Msbd Network Source" opcode="create" ,
content: [110][111][175][27]
177 <node> = attr: name="Properties" opcode="create" , content:
[122][123][124][125][126][127][128][129][130][131][132][133][134][135][136][137][138][139][140][141][142][143][144][145][146][147]
178 <node> = attr: name="WMS Network Source" opcode="create" ,
content: [120][121][177][29]
179 <node> = attr: name="Object Store" opcode="create" , content:
[172][24][174][26][176][28][178][30]
180 <node> = attr: name="Shared Properties" opcode="create" ,
content: [148]
181 <node> = attr: name="Network Source" opcode="create" , content:
[179][31][180][32]
182 <document> = attr: WMSNameSpaceVersion="2.0", content:
[154][6][166][18][170][22][181][33]
1 itterations

==============================
<?xml version="1.0"?><items
xmlns="x-schema:http://schemas.windowsupdate.com/iu/resultschema.xml"><itemStatus
xmlns="" timestamp="2003-01-25T14:14:23"><identity
itemID="microsoft.otherhardware.ver_platform_win32_nt.5.0.x86.en...2195...com_microsoft_whql.4180278_87565."
name="4180278_87565"><publisherName>com_microsoft_whql</publisherName><guid>3EF47C8F-3352-984D-906B-8D27D021AC5D</guid><language>en</language></identity><description
hidden="0"
timestamp="2003-01-24T04:10:58.000"><descriptionText><title>Microsoft
Usb Driver Version 5.1.2600.0</title><eula
href="/msdownload/update/v3/static/eula/en/corp_eula.htm"/></descriptionText><size>110336</size></description><platform
name="ver_platform_win32_nt"><processorArchitecture>x86</processorArchitecture><version
major="5" minor="0" build="2195" servicePackMajor=""
servicePackMinor=""/><productType/><suite/></platform><downloadStatus
value="COMPLETE"/><downloadPath>C:\Drvs13\Giga-Byte\Driver\en\com_microsoft_whql.otherhardware\x86win2k\com_microsoft_whql.4180278_87565</downloadPath><client>IU_Corp_Site</client></itemStatus></items>

1 <xml version="1.0"> =
2 <productType> =
3 <suite> =
4 <eula> = attr:
href="/msdownload/update/v3/static/eula/en/corp_eula.htm"
5 <version> = attr: major="5" minor="0" build="2195"
servicePackMajor="" servicePackMinor=""
6 <downloadStatus> = attr: value="COMPLETE"
7 <publisherName> = com_microsoft_whql
8 <guid> = 3EF47C8F-3352-984D-906B-8D27D021AC5D
9 <language> = en
10 <title> = Microsoft Usb Driver Version 5.1.2600.0
11 <descriptionText> = [10][4]
12 <size> = 110336
13 <processorArchitecture> = x86
14 <downloadPath> =
C:\Drvs13\Giga-Byte\Driver\en\com_microsoft_whql.otherhardware\x86win2k\com_microsoft_whql.4180278_87565
15 <client> = IU_Corp_Site
16 <identity> = attr:
itemID="microsoft.otherhardware.ver_platform_win32_nt.5.0.x86.en...2195...com_microsoft_whql.4180278_87565."
name="4180278_87565", content: [7][8][9]
17 <description> = attr: hidden="0"
timestamp="2003-01-24T04:10:58.000", content: [11][12]
18 <platform> = attr: name="ver_platform_win32_nt", content:
[13][5][2][3]
19 <itemStatus> = attr: xmlns="" timestamp="2003-01-25T14:14:23",
content: [16][17][18][6][14][15]
20 <items> = attr:
xmlns="x-schema:http://schemas.windowsupdate.com/iu/resultschema.xml",
content: [19]
1 itterations

==============================
<?xml version="1.0" encoding="utf-8"?><XMLDATA><Submission
SubmissionID="688904"><Category CategoryName="Storage/Adapter or
Controller"><Driver FolderName="driver000"><Language
LanguageName="English"><PackageCreationLocation
FolderName="G:\truyen\WHQL\Athena\raid\driver"
/></Language></Driver></Category></Submission></XMLDATA>

1 <xml version="1.0" encoding="utf-8"> =
2 <PackageCreationLocation> = attr:
FolderName="G:\truyen\WHQL\Athena\raid\driver"
3 <Language> = attr: LanguageName="English", content: [2]
4 <Driver> = attr: FolderName="driver000", content: [3]
5 <Category> = attr: CategoryName="Storage/Adapter or Controller",
content: [4]
6 <Submission> = attr: SubmissionID="688904", content: [5]
7 <XMLDATA> = [6]
2 itterations
 
E

Eric J. Roode

That's because \< and \> match word boundaries, not < and >
characters.

Not in Perl.
Perhaps you're thinking about some other regexp syntax?

--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top