% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/converters.R
\name{to_graphml}
\alias{to_graphml}
\title{Export to GraphML}
\usage{
to_graphml(edges, nodes = NULL, file = NULL, directed = FALSE)
}
\arguments{
\item{edges}{A data frame with at least \code{from}, \code{to}, \code{weight} columns.}

\item{nodes}{Optional data frame of node attributes with an \code{id} column.}

\item{file}{File path to write. If \code{NULL} (default), returns the GraphML
as a character string.}

\item{directed}{Logical. Default \code{FALSE}.}
}
\value{
If \code{file = NULL}: GraphML as a character string. Otherwise writes
the file and returns the path invisibly.
}
\description{
Writes a bibnets edge list (and optional node attributes) to a GraphML
file using pure base R — no XML package required.
}
\examples{
data(biblio_data)
edges <- keyword_network(biblio_data)
xml <- to_graphml(edges)
cat(substr(xml, 1, 300))
}
