Did I find the right examples for you? yes no

All Samples(18)  |  Call(10)  |  Derive(0)  |  Import(8)
XML/HTML writer (serializer) that works on Python objects that proxy
XML structure (similar to, but simpler and more and directly geared to
serialization than amara.tree and bindery nodes).  Writes the serialized
result to an output stream (sys.stdout by default).

Usage examples:

from amara.writers.struct import structwriter, E, NS, ROOT, RAW
output = structwriter(indent=u"yes")
output.feed((more...)

src/a/k/Akamu-0.7/lib/demo/xslt.py   Akamu(Download)
from akara.services import simple_service
from cStringIO import StringIO
from amara.writers.struct import structwriter, E, NS, ROOT
from amara.lib import U
from akara import request
def MakeFoafGraph(name='Chimezie Ogbuji'):
    src    = StringIO()
    w = structwriter(indent=u"yes", stream=src)
    w.feed(
        ROOT(

src/a/k/Akamu-0.7/lib/demo/protocol.py   Akamu(Download)
def ReverseTransform(graph):
    from rdflib import Namespace, RDF
    from amara.writers.struct import structwriter, E, ROOT
    from cStringIO import StringIO
    FOAF = Namespace("http://xmlns.com/foaf/0.1/")
    V    = Namespace("http://www.w3.org/2006/vcard/ns#")
 
    src = StringIO()
    w   = structwriter(indent=u"yes", stream=src)

src/a/k/Akamu-0.7/lib/demo/musicbrainz.py   Akamu(Download)
import json, os, cgi, urllib, re
from pprint import pprint
from amara.writers.struct import structwriter, E, ROOT
from cStringIO import StringIO
from akara import module_config as config, request
        tracks.add(trackLabel)
    src = StringIO()
    w = structwriter(indent=u"yes", stream=src)
    w.feed(ROOT(
        E(u'Music',{u'artist': ' / '.join(names)},
    pattern = re.compile(artist)
    src = StringIO()
    w = structwriter(indent=u"yes", stream=src)
 
    if category is not None and category.strip():

src/a/k/Akamu-0.7/lib/demo/gsp_validator.py   Akamu(Download)
from amara.lib.util                 import *
from amara.xslt                     import transform
from amara.writers.struct           import structwriter, E, NS, ROOT, RAW
from akara.services                 import simple_service, service
from akara                          import response
            validator = GraphStoreValidator(validator_url,gsInternalUrl)
            src = StringIO()
            w = structwriter(indent=u"yes", stream=src)
            w.feed(
                ROOT(

src/a/k/Akamu-0.7/lib/demo/wheezy.py   Akamu(Download)
from akara.services import simple_service
from cStringIO import StringIO
from amara.writers.struct import structwriter, E, NS, ROOT
from amara.lib import U
from akara import request
    request.environ['wheezy.http.cache_policy']  = policy
    src    = StringIO()
    w = structwriter(indent=u"yes", stream=src)
    w.feed(
        ROOT(

src/a/k/Akara-2.0.0a4/demo/etc/MoinMoin/formatter/application_xml.py   Akara(Download)
 
from amara import tree
from amara.writers.struct import structwriter, E, NS, ROOT, RAW
from amara.bindery.html import markup_fragment
from amara.lib import inputsource

src/a/k/Akamu-0.7/test/test_diglot.py   Akamu(Download)
from amara.namespaces import *
from amara import tree
from amara.writers.struct import structwriter, E, NS, ROOT
from amara.lib import U
 
                           })
        src    = StringIO()
        w = structwriter(indent=u"yes", stream=src)
        w.feed(
            ROOT(
 
        src    = StringIO()
        w = structwriter(indent=u"yes", stream=src)
        w.feed(
            ROOT(
        #file name, which is returned in Location header
        src    = StringIO()
        w = structwriter(indent=u"yes", stream=src)
        w.feed(
            ROOT(
 
        src    = StringIO()
        w = structwriter(indent=u"yes", stream=src)
        w.feed(
            ROOT(

src/a/m/Amara-2.0.0/test/writers/test_struct.py   Amara(Download)
import amara
from amara.lib import treecompare
from amara.writers.struct import structwriter, structencoder, E, NS, ROOT, RAW, E_CURSOR
#from amara import tree
#from amara import bindery