1 // ------------------------------------------------
7 // (c) 2002 peercast.org
8 // ------------------------------------------------
9 // This program is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 // ------------------------------------------------
23 //-----------------------
27 //-----------------------
30 //-----------------------
43 Node(const char *,...);
50 void write(Stream &,int); // output, level
51 char *getName() {return getAttrName(0);}
53 char *getAttrValue(int i) {return &attrData[attr[i].valuePos];}
54 char *getAttrName(int i) {return &attrData[attr[i].namePos];}
55 char *getContent() {return contData; }
56 int getBinaryContent(void *, int);
58 void setAttributes(const char *);
59 void setContent(const char *);
60 void setBinaryContent(void *, int);
62 Node *findNode(const char *);
63 char *findAttr(const char *);
64 int findAttrInt(const char *);
65 int findAttrID(const char *);
67 char *contData,*attrData;
72 Node *child,*parent,*sibling;
83 void setRoot(Node *n);
85 void writeCompact(Stream &);
86 void writeHTML(Stream &);
88 Node *findNode(const char *n);