Re: [xml] How can i do regexp operation?

On Thu, 2007-06-28 at 14:59 -0400, Jason Viers wrote:
kalyanasundaram wrote:
I have a node like this
<node val="S 100,164.44 D -199> 
even more complex i have it.

Whoever designed that xml structure did a poor job and completely 
avoided the benefit of xml.  It _should_ look something like
<node type="s" val1="100" val2="164.44"..... to allow the XML library to 
handle parsing the structre.  That's what it's for.

But the separation between your values is not part of the xml, it's all 
part of the attribute value.  What you have is a non-xml chunk of data 
that you need to parse.  A separate regex library might be able to help, 
but it's nothing that libxml should be expected to provide.

Yeh, you may be right. I was trying to edit the SVG files. So the data
is basically a <path>. I tried very much, and thought of check my luck.
Going to check python SVG bindings.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]