nova proba

Revision:
2:45b351b4fc2a
Child:
3:1196befeace0
diff -r e1bde4e82763 -r 45b351b4fc2a doHTML.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doHTML.cpp	Sun Apr 05 12:56:41 2020 +0000
@@ -0,0 +1,38 @@
+
+#include "string.h"
+#include "dxml.h"
+
+#include "doHTML.h"
+
+#include "HTMLpage.h"
+
+
+char* p_HTMLpage;
+dxml_t p_rootHTML;
+
+
+void inic_html( void )
+{
+    
+    p_HTMLpage = (char*)malloc(sizeof(HTMLpage));
+    strcpy( p_HTMLpage, HTMLpage);
+    
+       p_rootHTML = dxml_parse_str(p_HTMLpage, strlen(p_HTMLpage));
+    
+    auto body = dxml_child(p_rootHTML, "body");
+    auto form = dxml_child(body, "form");
+    auto table = dxml_child(form, "table");
+    auto tr = dxml_child(table, "tr");    
+    auto td = dxml_child(tr, "td");
+    auto input = dxml_child(td, "input");
+    
+    dxml_set_attr(input, "value", "dragomir");   
+}
+
+char *getHTML_free( void )
+{
+    return dxml_toxml(p_rootHTML);
+}
+
+
+