[Gambas-user] Edit XML

Fabien Bodard gambas.fr at ...626...
Mon Nov 22 06:48:37 CET 2010


In fact the problem is simple ... xmldoc is not finalized ... since many year.

if someone have capabilities and times for it ...

2010/11/21 Mauricio Baeza <mauricio at ...2500...>:
> El sáb, 20-11-2010 a las 13:54 +0100, Caveat escribió:
>
>> Hi Mauricio
>>
>> Sorry for the late reply, I was doing a lot of thinking. :-)
>>
>> Perhaps you might like something along these lines:
>>
>> XMLRewriter is a class in a little project I've been working on.  The
>> idea of XMLRewriter is that it should be capable of parsing any XML
>> input and applying edits to it to create a new output XML.  The
>> XMLRewriter class itself does not need to know anything about the XML
>> it's being fed, as it automagically builds an internal data model of the
>> provided XML. :-D
>>
>> Let me know if you're interested in taking this further, perhaps we can
>> go off-list to get into the details.
>>
>> Regards,
>> Caveat
>>
>> On Mon, 2010-11-15 at 22:58 -0600, Mauricio Baeza wrote:
>>
>> > Hi all ...
>> >
>> > With the library for XML I can, without problems ...
>> > 1 .- Create new XML file
>> > 2 .- Read any XML file
>> >
>> > What I can not do is change just one attribute of an element of an
>> > existing file. Does anyone have a sample?
>> >
>> > Greetings
>> >
>> >
>> >
>>
>
>
>
> Hello ...
>
> Thanks for the reply ...
>
> I really just want to know how to edit an attribute of an element.
> Currently I have solved simply not adding the attribute to first create
> the XML. Then add it as follows:
>
> DIM oDocXMLTmp AS NEW XmlDocument
> DIM sTmp AS String
>
>    oDocXMLTmp.FromString(docXML)
>    oDocXMLTmp.Root.NewAttribute("sello", Sello)
>    sTmp = oDocXMLTmp.ToString()
>
> But the stamp is the final attribute. To be in the order I want, I need
> to add it to create the XML and then edit. Which I could not. If only
> you could help me with this, much will thank you.
>
> Best regards
>
>
> --
> Mauricio Baeza
>
> 10 años usando OpenOffice.org, libre, gratuito y seguro
> _______________________________
> Todo lo que no es dado es perdido
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard




More information about the User mailing list