Debug question!

Everything else that doesn't fall into one of the other PB categories.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Debug question!

Post by Vera »

freak wrote:People have a life, you know. Not everybody is waiting just to answer your questions.
If you can't even show a little patience then even less people will make the effort to help you.
Don't forget I'm a human being as well, living and thus underlying emotional states just as any human - like you too.

It's not at all I miss patience - I have too much. That's why a lot of requests never have been answered. Now after learning that one looses on pureboard when being really patient I have to find another way.

Please stop only accusing me or setting me down. You've never shown any other behaviour towards me since I joined. I'm trapped in your damnation.

No need to accuse me of not knowing people having a life rather regard the same validity for me.

Vera
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Debug question!

Post by Vera »

blueznl wrote:Take it easy. Some of my questions were not answered for ages either... and look how brilliant I have become 8) Thanks to all those non-replies I had to figure it out myself, and now I'm definitely settled and on my way to world domination, and all those non-replying forum members will become my slaves, mowhahahahahahahaargh... excuse me, peanut (cough).
Genial :lol: ~ I'll surely regard this

Dear blueznl, thanks for your 'enlighting' words. Yes, everybody should be free to act as he chooses. Still it struck me that much, presuming it would have been an 'extremly easy' question to most of the members, not worthy for it's own thread and answerable in half a minute. I now see that was quite a misjudgement.

cheers ~ Vera
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Debug question!

Post by Vera »

Hello Trond,

Thanks for the explanation, giving me a slight idea, how this 'string' might be administered inside the memory.

And big thanks for your procedure Image
- that finally helped me out to achive what I aimed at. Image

For anyone to have a look and maybe helpful for other beginners to step into the xml-concerns I'd like to place my starting example here.

greetings ~ Vera

Code: Select all

Define xml, mainNode, item

Procedure.s XmlToString(xml)
  Protected Size = ExportXMLSize(xml)
  Protected Value.s = Space(Size)
  ExportXML(xml, @Value, Size)
;  Debug Value
  ProcedureReturn Value
EndProcedure 

xml = CreateXML(#PB_Any)
mainNode = CreateXMLNode(RootXMLNode(xml))
SetXMLNodeName(mainNode, "Root")

item = CreateXMLNode(mainNode)
SetXMLNodeName(item, "Topic1")
SetXMLAttribute(item, "id", "1")
SetXMLNodeText(item, "flavor")

item = CreateXMLNode(mainNode)
SetXMLNodeName(item, "Topic1")
SetXMLAttribute(item, "id", "2")
SetXMLNodeText(item, "taste")

item = CreateXMLNode(mainNode)
SetXMLNodeName(item, "Topic1")
SetXMLAttribute(item, "id", "3")
SetXMLNodeText(item, "gusto")

SaveXML(xml, "xmlTest.xml")
Result.s = XmlToString(xml)
Debug Result

OpenWindow(0, 40, 110, 420, 280, "Show XML", #PB_Window_SystemMenu)
EditorGadget(1, 10, 10, 400, 260)
; AddGadgetItem(1,-1, Result)
; AddGadgetItem(1,-1, "-----------")
FormatXML(xml, #PB_XML_ReFormat)
Result.s = XmlToString(xml)
Debug Result
AddGadgetItem(1,-1, #CRLF$ + Result)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 
freak
PureBasic Team
PureBasic Team
Posts: 5962
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Debug question!

Post by freak »

Vera wrote:Please stop only accusing me or setting me down. You've never shown any other behaviour towards me since I joined. I'm trapped in your damnation.
There was no accusation. I merely stated a fact.
quidquid Latine dictum sit altum videtur
Post Reply