List Info

Thread: extracting attributes from xml




extracting attributes from xml
user name
2007-10-18 07:30:44
I have an XML element and I would like to extract the
attributes from
it for example:
<tag attr1="value1" attr2="value2"
attr3="value3" ></tag>
I need a pattern to extract
attr1="value1"
attr2="value2"
attr3="value3"

Please help
Thanks in advance
Z


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: extracting attributes from xml
user name
2007-10-18 07:57:25
found the answer:
([^=s]*)=([^=s]*)

any comments or improvements are welcome
Thanks,
Z

On Oct 18, 8:30 am, z <zvi.sep...gmail.com> wrote:
> I have an XML element and I would like to extract the
attributes from
> it for example:
> <tag attr1="value1"
attr2="value2" attr3="value3"
></tag>
> I need a pattern to extract
> attr1="value1"
> attr2="value2"
> attr3="value3"
>
> Please help
> Thanks in advance
> Z


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )